/* Vreeko — faith social platform */
:root {
  --ink: #14241c;
  --ink-soft: #3a4f44;
  --muted: #6b7f73;
  --line: rgba(20, 36, 28, 0.1);
  --line-strong: rgba(20, 36, 28, 0.16);
  --surface: #f7faf8;
  --surface-2: #eef4f0;
  --paper: #ffffff;
  --brand: #1a5c40;
  --brand-deep: #0d3a28;
  --brand-soft: #d7ebe0;
  --accent: #c4922a;
  --accent-soft: #f5e8c8;
  --danger: #b42318;
  --success: #1a7a4c;
  --info: #2d6a8a;
  --shadow: 0 18px 50px rgba(13, 58, 40, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 64px;
  --font: "Sora", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-verse: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26, 92, 64, 0.12), transparent 55%),
    radial-gradient(900px 500px at 95% 0%, rgba(196, 146, 42, 0.10), transparent 50%),
    linear-gradient(180deg, #f4f8f5 0%, var(--surface) 40%, #eef3f0 100%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }

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

h1, h2, h3, .brand-mark {
  font-family: var(--font-display);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

p { margin: 0 0 1rem; color: var(--ink-soft); }

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

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

/* Top nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(247, 250, 248, 0.82);
  border-bottom: 1px solid var(--line);
}

.topnav-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
  flex: 1;
}
.nav-links a {
  color: var(--ink-soft);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a.is-active {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #2f8a5f);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar.xl { width: 128px; height: 128px; font-size: 2.2rem; }
button.avatar { border: 0; padding: 0; cursor: pointer; font: inherit; }

.profile-page { padding: 1.5rem 0 3rem; }
.profile-hero {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.profile-photo-wrap { position: relative; flex-shrink: 0; }
.profile-photo { box-shadow: 0 10px 28px rgba(13, 58, 40, 0.16); }
.profile-photo-edit {
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  transform: translateX(-50%);
  border: 0;
  background: var(--paper);
  color: var(--brand-deep);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  white-space: nowrap;
}
.profile-id { flex: 1; min-width: 200px; }
.profile-id h1 { margin: 0 0 0.2rem; }
.profile-sub { margin: 0; color: var(--muted); }
.profile-bio { margin: 0.7rem 0 0; }
.profile-timeline { margin-top: 1rem; }
.profile-timeline h2 { margin: 0.2rem 0 0.4rem; font-size: 1.05rem; }
.pf-settings-row { display: flex; align-items: center; gap: 0.9rem; }

.pf-lightbox[hidden],
.pf-modal[hidden] { display: none !important; }
.pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 16, 12, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}
.pf-lightbox img {
  max-width: min(92vw, 820px);
  max-height: 78vh;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
.pf-lightbox-x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.pf-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.pf-backdrop { position: absolute; inset: 0; background: rgba(10, 22, 16, 0.55); }
.pf-sheet {
  position: relative;
  width: min(520px, 100%);
  background: var(--paper);
  border-radius: 20px;
  padding: 1.1rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}
.pf-head { display: flex; align-items: center; justify-content: space-between; }
.pf-head h2 { margin: 0; font-size: 1.2rem; }
.pf-lead { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 0.8rem; }
.pf-stage {
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #10261c;
  touch-action: none;
  cursor: grab;
}
.pf-stage canvas { width: 100%; height: 100%; display: block; }
.pf-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 1.5rem;
  pointer-events: none;
}
.pf-empty span { color: rgba(255,255,255,0.72); font-size: 0.85rem; margin-top: 0.3rem; }
.pf-empty[hidden] { display: none !important; }
.pf-zoom {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.9rem auto 0;
  max-width: 360px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.pf-zoom input { flex: 1; }
.pf-status { text-align: center; font-weight: 600; color: var(--muted); }
.pf-status[data-kind="bad"] { color: var(--danger); }
.pf-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.8rem; }

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(26, 92, 64, 0.22);
}
.btn-primary:hover { color: #fff; }
.btn-accent {
  background: linear-gradient(135deg, #d4a437, var(--accent));
  color: #1a1408;
  box-shadow: 0 10px 24px rgba(196, 146, 42, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-soft {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.btn-danger { background: #fde8e6; color: var(--danger); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }
.btn-block { width: 100%; }

/* Layout panels */
.panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel-quiet {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.app-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 1.25rem;
  padding: 1.5rem 0 3rem;
}

@media (max-width: 980px) {
  .app-grid { grid-template-columns: 1fr; }
  .side-left, .side-right { display: none; }
  .nav-links { display: none; }
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.side-nav a:hover,
.side-nav a.is-active {
  background: var(--paper);
  color: var(--brand-deep);
  box-shadow: 0 1px 0 var(--line);
}

/* Compose launcher */
.compose-launcher-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.compose-prompt {
  flex: 1;
  text-align: left;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}
.compose-prompt:hover { background: #e6eee9; }
.compose-launcher-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.compose-action {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem;
  border-radius: 10px;
  cursor: pointer;
}
.compose-action:hover { background: var(--brand-soft); color: var(--brand-deep); }
.compose-hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Composer modal */
body.composer-open { overflow: hidden; }
.composer-modal[hidden] { display: none; }
.composer-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.composer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 17, 0.52);
  backdrop-filter: blur(4px);
}
.composer-sheet {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(10, 28, 20, 0.28);
  padding: 0 0 1.15rem;
}
.composer-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.composer-head h2 {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.composer-x {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.composer-form { padding: 1rem 1.15rem 0; }
.composer-who {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.composer-audience select {
  margin-top: 0.25rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  background: var(--surface-2);
  width: auto;
}
.composer-form textarea {
  width: 100%;
  min-height: 88px;
  border: 0;
  resize: vertical;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: transparent;
}
.composer-form textarea:focus { outline: none; }
.composer-drop {
  margin-top: 0.75rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  min-height: 150px;
  background: #fafcfb;
  cursor: pointer;
  position: relative;
  padding: 0.75rem;
}
.composer-drop.is-over,
.composer-drop:hover { border-color: var(--brand); background: #f3f8f5; }
.composer-drop[data-empty="1"] .composer-drop-empty { display: grid; }
.composer-drop[data-empty="0"] .composer-drop-empty { display: none; }
.composer-drop-empty {
  place-items: center;
  text-align: center;
  gap: 0.2rem;
  min-height: 130px;
  color: var(--ink-soft);
}
.composer-drop-empty span { font-size: 0.85rem; color: var(--muted); }
.composer-drop-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--brand-deep);
  margin-bottom: 0.25rem;
}
.composer-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}
.composer-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}
.composer-thumb img,
.composer-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.composer-thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  cursor: pointer;
}
.composer-thumb-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}
.composer-add-more {
  margin-top: 0.55rem;
  border: 0;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.composer-status {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.composer-status[data-kind="bad"] { color: var(--danger); }
.composer-status[data-kind="good"] { color: var(--success); }
.composer-options,
.composer-feelings {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}
.composer-options-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.45rem;
}
.composer-option-row,
.composer-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.composer-opt,
.composer-chip {
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.composer-opt:hover,
.composer-chip:hover { background: var(--brand-soft); color: var(--brand-deep); }
.composer-opt.is-on {
  background: var(--brand-deep);
  color: #fff;
  border-color: var(--brand-deep);
}
.composer-chip { display: inline-flex; align-items: center; gap: 0.45rem; }
.composer-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.composer-ico {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}
.composer-chip:has(input:checked) {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}
.composer-place {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}
.composer-place label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.composer-place input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
.tz-hint {
  margin: 0.35rem 0 0.7rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.composer-form .btn-block { margin-top: 1rem; }

.post-media-grid {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.post-media-grid.media-count-1 { grid-template-columns: 1fr; }
.post-media-grid.media-count-2 { grid-template-columns: 1fr 1fr; }
.post-media-grid.media-count-3,
.post-media-grid.media-count-4 { grid-template-columns: 1fr 1fr; }
.post-media {
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0;
  background: #e7eee9;
  position: relative;
  aspect-ratio: 1 / 1;
}
button.post-media {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: zoom-in;
}
.post-media-grid.media-count-1 .post-media {
  aspect-ratio: 4 / 5;
  max-height: 640px;
}
.post-media-grid .post-media img,
.post-media-grid .post-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #e7eee9;
  display: block;
}
.media-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 20, 14, 0.45);
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
}

.compose textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  font: inherit;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
}
.compose textarea:focus {
  outline: 2px solid rgba(26, 92, 64, 0.25);
  border-color: var(--brand);
}
.compose-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.85rem;
}
.compose-bar select,
.field input,
.field textarea,
.field select {
  font: inherit;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}
.field { margin-bottom: 1rem; }
.quota-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.quota-label span { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.quota-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.quota-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #2f8a5f);
}
.quota-fill.is-full { background: var(--danger); }
.comment-form {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.comment-photo-add input { display: none; }
.comment-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.comment-photo {
  border: 0;
  padding: 0;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  background: #e7eee9;
  cursor: zoom-in;
}
.comment-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}
.file-pill input { display: none; }

/* Posts */
.post {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.post:last-child { border-bottom: 0; }
.post-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.7rem;
}
.post-menu-wrap { position: relative; flex-shrink: 0; }
.post-more {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.post-more:hover,
.post-menu-wrap.is-open .post-more { background: var(--surface-2); color: var(--ink); }
.post-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  min-width: 198px;
  padding: 0.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.post-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}
.post-menu button:hover { background: var(--brand-soft); color: var(--brand-deep); }
.post-edit { margin-bottom: 0.75rem; }
.post-edit textarea {
  width: 100%;
  font: inherit;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  resize: vertical;
  min-height: 5.5rem;
}
.post-edit-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.edit-media,
.edit-new { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.65rem; }
.edit-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: #e7eee9;
}
.edit-thumb img,
.edit-thumb video { width: 100%; height: 100%; object-fit: contain; display: block; }
.edit-thumb.is-removed { opacity: 0.35; }
.edit-thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 28, 22, 0.72);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}
.pf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.pf-prev { left: 1rem; }
.pf-next { right: 1rem; }
.pf-count { margin: 0; color: #fff; font-weight: 600; font-size: 0.9rem; }
.feed-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  z-index: 40;
  background: var(--brand-deep);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.feed-toast[hidden] { display: none !important; }
.post-meta { flex: 1; min-width: 0; }
.post-meta .name {
  font-weight: 600;
  color: var(--ink);
  display: block;
}
.post-meta .when {
  font-size: 0.8rem;
  color: var(--muted);
}
.post-body {
  color: var(--ink);
  white-space: pre-wrap;
  margin-bottom: 0.75rem;
}
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.rx { margin: 0.15rem 0 0.35rem; }
.rx-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.4rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.rx-summary[hidden] { display: none !important; }
.rx-stack { display: inline-flex; }
.rx-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: -5px;
  border: 2px solid #fff;
  background: var(--surface-2);
}
.rx-dot { font-size: 0.72rem; line-height: 1; }
.rx-dot.amen { color: #c4922a; background: #f5e8c8; }
.rx-dot.pray { color: #2d6a8a; background: #e7f2f8; }
.rx-dot.love { color: #b42318; background: #fde8e6; }
.rx-dot.encourage { color: #1a7a4c; background: #e5f6ec; }
.rx-bar { border-top: 1px solid var(--line); padding-top: 0.35rem; }
.rx-hold { position: relative; display: inline-flex; }
.rx-tray {
  position: absolute;
  left: 0;
  bottom: 100%;
  display: none;
  padding-bottom: 12px;
  z-index: 6;
  pointer-events: auto;
}
.rx-hold:hover .rx-tray,
.rx.is-open .rx-tray { display: block; }
.rx-tray-inner {
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(13, 58, 40, 0.16);
}
.rx-pick {
  appearance: none;
  border: 0;
  background: var(--surface-2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  color: var(--ink-soft);
  transition: transform 0.16s var(--ease);
}
.rx-pick span {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #14241c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.rx-pick:hover { transform: scale(1.12); }
.rx-pick:hover span { opacity: 1; }
.rx-pick { font-size: 1.35rem; line-height: 1; }
.rx-pick.amen { color: #c4922a; }
.rx-pick.pray { color: #2d6a8a; }
.rx-pick.love { color: #b42318; }
.rx-pick.encourage { color: #1a7a4c; }
.rx-main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}
.rx-main:hover { background: var(--surface-2); }
.rx-main-ico { width: 1.25rem; height: 1.25rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; line-height: 1; }
.rx-main.is-on.amen { color: #c4922a; }
.rx-main.is-on.pray { color: #2d6a8a; }
.rx-main.is-on.love { color: #b42318; }
.rx-main.is-on.encourage { color: #1a7a4c; }

.comment-list { margin-top: 0.75rem; }
.comment {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin-top: 0.55rem;
  font-size: 0.92rem;
}
.comment .bubble {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 0.55rem 0.8rem;
  flex: 1;
  min-width: 0;
}
.comment .bubble strong { color: var(--ink); }
.comment-tools {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.comment:hover .comment-tools,
.comment:focus-within .comment-tools { opacity: 1; }
.comment-tools button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.1rem 0.15rem;
}
.comment-tools button:hover { color: var(--brand-deep); }
.comment-tools .comment-del:hover { color: var(--danger); }

/* Verse / devotion cards */
.verse-block {
  font-family: var(--font-verse);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0.5rem 0 0.75rem;
}
.verse-ref {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.devotion-rail h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.devotion-rail p { font-size: 0.9rem; margin-bottom: 0.6rem; }

/* Landing */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(13, 58, 40, 0.88) 0%, rgba(26, 92, 64, 0.55) 42%, rgba(13, 58, 40, 0.2) 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(800px 500px at 70% 40%, rgba(196, 146, 42, 0.25), transparent 60%);
  z-index: 0;
  animation: dawnShift 18s ease-in-out infinite alternate;
}
@keyframes dawnShift {
  from { filter: hue-rotate(0deg) brightness(1); }
  to { filter: hue-rotate(-8deg) brightness(1.05); }
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0 5rem;
  color: #f4faf6;
}
.hero .brand {
  color: #fff;
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin-bottom: 0.6rem;
  animation: riseIn 0.9s var(--ease) both;
}
.hero .brand span { color: #f0c14b; }
.hero h1 {
  font-family: var(--font);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  letter-spacing: -0.01em;
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.85rem;
  animation: riseIn 0.9s 0.08s var(--ease) both;
}
.hero .lede {
  max-width: 42ch;
  color: rgba(244, 250, 246, 0.78);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  animation: riseIn 0.9s 0.16s var(--ease) both;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: riseIn 0.9s 0.24s var(--ease) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.section {
  padding: 4rem 0;
}
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; }
}
.feature {
  padding: 1.4rem 1.3rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
}
.feature h3 { font-size: 1.15rem; }
.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* Auth */
.auth-shell {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: min(440px, 100%);
  padding: 2rem 1.75rem;
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}
.auth-card .sub {
  color: var(--muted);
  margin-bottom: 1.4rem;
  font-size: 0.95rem;
}
.auth-card-wide { width: min(520px, 100%); }
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .name-row { grid-template-columns: 1fr; }
}
.validation-message {
  min-height: 1.1rem;
  margin-top: 0.3rem;
  font-size: 0.82rem;
}
.validation-message.valid { color: var(--success); }
.validation-message.invalid { color: var(--danger); }
.password-requirements {
  margin-top: 0.7rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface-2);
  border-radius: 10px;
  border-left: 3px solid var(--brand);
}
.password-requirements p {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-deep);
}
.password-requirements ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.password-requirements li {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.15rem 0;
}
.password-requirements li::before {
  content: '✗ ';
  color: var(--danger);
}
.password-requirements li.valid { color: var(--ink-soft); }
.password-requirements li.valid::before {
  content: '✓ ';
  color: var(--success);
}
.setup-banner { margin-bottom: 1rem; }
.setup-banner h2 { margin-bottom: 0.35rem; }

/* Flash */
.flashes {
  width: min(1120px, calc(100% - 2rem));
  margin: 0.85rem auto 0;
  display: grid;
  gap: 0.45rem;
}
.flash {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  animation: riseIn 0.4s var(--ease) both;
}
.flash.success { background: #e5f6ec; color: var(--success); }
.flash.error { background: #fde8e6; color: var(--danger); }
.flash.info { background: #e7f2f8; color: var(--info); }

/* Backyard */
.by-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--nav-h));
}
@media (max-width: 800px) {
  .by-shell { grid-template-columns: 1fr; }
}
.by-nav {
  background: var(--brand-deep);
  color: #dff0e7;
  padding: 1.25rem 1rem;
}
.by-nav a {
  display: block;
  color: rgba(223, 240, 231, 0.82);
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
}
.by-nav a:hover,
.by-nav a.is-active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.by-main { padding: 1.5rem; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.stat .n {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brand-deep);
}
.stat .l { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table th,
.table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.table th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge.ok { background: #e5f6ec; color: var(--success); }
.badge.warn { background: var(--accent-soft); color: #7a5a12; }
.badge.bad { background: #fde8e6; color: var(--danger); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
  color: var(--ink-soft);
}
.checkbox-row input { width: 1rem; height: 1rem; }

.legal-page h3 { margin-top: 1.4rem; }
.legal-page ul { padding-left: 1.2rem; color: var(--ink-soft); }
.legal-page li { margin: 0.35rem 0; }
.legal-updated { color: var(--muted); font-size: 0.88rem; }
.footer-mini {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  background: rgba(247, 250, 248, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
  z-index: 40;
}
.mobile-dock a {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.35rem;
}
.mobile-dock a.is-active { color: var(--brand-deep); }
@media (max-width: 980px) {
  .mobile-dock { display: flex; }
  body { padding-bottom: 4.5rem; }
}
