/* 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: 56px;
  --tabbar-h: 56px;
  --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 {
  max-width: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  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%);
  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;
  background: rgba(247, 250, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.22s var(--ease);
}
.topnav.is-away { transform: translateY(-100%); }

.topnav-inner {
  position: relative;
  width: min(1120px, calc(100% - 1.25rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.topnav .brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  cursor: pointer;
}
.brand:hover { color: var(--brand); }
.brand span {
  color: var(--accent);
  margin-left: 0.01em;
}
.nav-left,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1 1 0;
  min-width: 0;
  z-index: 2;
  /* Let taps through empty space so the centered brand stays clickable. */
  pointer-events: none;
}
.nav-left > *,
.nav-actions > * {
  pointer-events: auto;
}
.nav-left { justify-content: flex-start; }
.nav-actions { justify-content: flex-end; margin-left: 0; }

.nav-create-btn,
.nav-menu-btn,
.nav-home-btn,
.nav-reels-btn,
.nav-search-btn,
.note-trigger {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  background: transparent;
  flex: 0 0 auto;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-create-btn {
  color: var(--brand);
  margin-right: 0.2rem;
}
.nav-create-btn svg,
.nav-menu-btn svg,
.nav-home-btn svg,
.nav-reels-btn svg,
.nav-search-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
.nav-create-btn svg {
  width: 21px;
  height: 21px;
}
.nav-label { display: none; }
.nav-ico {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.nav-create-btn:hover,
.nav-menu-btn:hover,
.nav-home-btn:hover,
.nav-reels-btn:hover,
.nav-search-btn:hover,
.nav-home-btn.is-active,
.nav-reels-btn.is-active {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.nav-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  line-height: 0;
  margin-right: 0.35rem;
}
.nav-profile:hover { opacity: 0.9; }
.nav-profile .avatar {
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
  background: linear-gradient(135deg, var(--brand), #2f8a5f);
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(26, 92, 64, 0.2);
}

.note-wrap { position: relative; }
.note-trigger {
  position: relative;
}
.note-trigger:hover { background: var(--brand-soft); color: var(--brand-deep); }
.note-bell {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: top center;
}
.note-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 0.95rem;
  height: 0.95rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 0.95rem;
  text-align: center;
}
@keyframes note-ring {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(-16deg); }
  30% { transform: rotate(12deg); }
  45% { transform: rotate(-8deg); }
  60% { transform: rotate(5deg); }
}
.tabbar {
  display: none;
}
.note-wrap.has-unread .note-bell,
.tabbar-item.has-unread .note-bell {
  stroke: #b42318;
  animation: note-ring 2s ease-in-out infinite;
}
.note-wrap.is-ringing .note-bell,
.tabbar-item.is-ringing .note-bell { animation: note-ring 0.6s ease-in-out 1; }
.note-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(360px, 86vw);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 40;
  padding: 0.35rem 0 0.6rem;
}
.note-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem 0.35rem;
}
.note-menu-head strong { font-size: 0.92rem; }
.note-clear-all {
  border: 0;
  background: transparent;
  color: var(--brand-deep);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.note-clear-all:hover { text-decoration: underline; }
.note-item {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.note-item-body { flex: 1; min-width: 0; }
.note-item-main {
  display: block;
  padding: 0.7rem 0.35rem 0.35rem 0.9rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.note-item-main:hover { background: var(--surface-2); }
.note-item p { margin: 0 0 0.3rem; color: var(--ink); font-size: 0.9rem; }
.note-item-go {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--brand-deep);
}
.note-friend-actions {
  display: flex;
  gap: 0.4rem;
  padding: 0 0.9rem 0.7rem;
}
.note-friend-actions--page { padding: 0.15rem 0 0.65rem; }
.note-friend-status {
  margin: 0.15rem 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.note-friend-status--accepted { color: #1a7a45; }
.note-friend-status--declined { color: #a52d21; }
.note-accept,
.note-decline {
  border: 0;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
}
.note-accept { background: #1a7a45; }
.note-accept:hover { background: #146338; }
.note-decline { background: #c0392b; }
.note-decline:hover { background: #a52d21; }
.note-dismiss {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  align-self: flex-start;
}
.note-dismiss:hover { color: var(--ink); }
.note-empty { margin: 0; padding: 0.8rem 0.9rem; color: var(--muted); }
.note-history {
  display: block;
  padding: 0.7rem 0.9rem 0.2rem;
  font-size: 0.86rem;
  font-weight: 700;
}
.note-history-page { padding: 2rem 0 3rem; }
.note-tabs { display: flex; gap: 0.4rem; margin: 0.4rem 0 1rem; }
.note-tabs a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 650;
}
.note-tabs a.is-active { background: var(--brand-soft); color: var(--brand-deep); }
.note-card-main {
  display: block;
  color: inherit;
  text-decoration: none;
  margin: -0.15rem -0.15rem 0.45rem;
  padding: 0.15rem;
  border-radius: 10px;
}
.note-card-main:hover { background: var(--surface-2); }
.note-card-main span {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--brand-deep);
}
.note-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
}
.note-card.is-unread { border-left: 3px solid var(--brand); }
.note-card p { margin-bottom: 0.35rem; }
.note-card-foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}
.note-card-actions { display: flex; gap: 0.4rem; margin-left: auto; }
.note-delete { background: #b42318; color: #fff; border: 0; border-radius: 999px; padding: 0.35rem 0.7rem; cursor: pointer; }

.avatar {
  width: 36px;
  height: 36px;
  aspect-ratio: 1;
  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;
  flex: 0 0 auto;
  align-self: center;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  min-width: 0;
  min-height: 0;
}
.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: 1rem 0 3rem;
  max-width: 100%;
  overflow-x: clip;
}
.profile-page .panel,
.profile-page .profile-card,
.profile-page .profile-layout,
.profile-page .profile-rail,
.profile-page .profile-timeline,
.profile-page .profile-side-card,
.profile-page .profile-intro,
.profile-page .compose-launcher,
.profile-page .wall-compose {
  max-width: 100%;
  min-width: 0;
}
.profile-card { margin-bottom: 1rem; }
.profile-cover {
  position: relative;
  aspect-ratio: 3 / 1;
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(120deg, rgba(26, 92, 64, 0.92), rgba(47, 138, 95, 0.72) 48%, rgba(212, 164, 55, 0.55));
  overflow: hidden;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-view {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.cover-view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-edit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 58, 40, 0.18);
}
.cover-edit svg { width: 14px; height: 14px; display: block; }
.profile-headband {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 0 1.1rem 1rem;
}
.profile-photo-wrap { position: relative; flex-shrink: 0; }
.profile-headband .profile-photo {
  margin-top: -46px;
  border: 4px solid #fff;
  box-shadow: 0 10px 28px rgba(13, 58, 40, 0.16);
}
.profile-id { flex: 1 1 12rem; min-width: 0; padding-bottom: 0.35rem; }
.profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-left: auto; padding-bottom: 0.35rem; max-width: 100%; }
.profile-id h1 {
  margin: 0 0 0.2rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.profile-sub {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.profile-follows {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.profile-follows strong {
  color: var(--ink);
  font-weight: 700;
}
.profile-follows span[aria-hidden="true"] {
  margin: 0 0.35rem;
  color: var(--muted);
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  max-width: 100%;
  min-width: 0;
}
.profile-rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-h, 64px) + 0.75rem);
}
@media (min-width: 801px) {
  .profile-rail {
    align-self: start;
    max-height: calc(100dvh - var(--nav-h, 64px) - 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .profile-rail::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  .profile-rail:hover {
    scrollbar-width: thin;
  }
  .profile-rail:hover::-webkit-scrollbar {
    width: 6px;
  }
  .profile-rail:hover::-webkit-scrollbar-thumb {
    background: rgba(20, 36, 28, 0.28);
    border-radius: 999px;
  }
  .profile-rail:hover::-webkit-scrollbar-track {
    background: transparent;
  }
}
.profile-intro h2,
.profile-timeline h2,
.profile-side-card h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.profile-intro p { margin: 0 0 0.7rem; }
.profile-muted { color: var(--muted); }
.profile-fact { color: var(--ink-soft); font-size: 0.92rem; }
.profile-intro .btn { margin-top: 0.4rem; }
.profile-side-card { padding: 0.95rem 1rem 1.05rem; }
.profile-side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.profile-side-head a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}
.profile-side-head a:hover { text-decoration: underline; }
.profile-side-count {
  margin: -0.15rem 0 0.7rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.profile-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  width: 100%;
  max-width: 100%;
}
.profile-peek-wrap {
  position: relative;
  width: 100%;
}
.profile-peek.is-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.profile-peek.is-friends {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.45rem;
}
.profile-peek-nav { display: none; }
.profile-photo-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  margin: 0;
  background: #e7eee9;
  cursor: zoom-in;
  overflow: hidden;
}
.profile-photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-photo-grid-page {
  gap: 4px;
  border-radius: 14px;
}
.profile-friend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.45rem;
  width: 100%;
  max-width: 100%;
}
.profile-friend-grid-page {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 0.75rem;
}
@media (min-width: 640px) {
  .profile-friend-grid-page {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .profile-friend-grid-page {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.profile-friend-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.profile-friend-avatar {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
}
.profile-friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-friend-name {
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-subpage-head {
  margin: 0 0 1rem;
}
.friend-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.friend-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.friend-sort label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.friend-sort select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0 0.7rem;
}
.profile-subpage-head h1 { margin: 0.15rem 0 0.25rem; }
.profile-crumb {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.profile-crumb a { color: var(--brand); font-weight: 600; }
@media (max-width: 800px) {
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-rail { position: static; }
  .profile-peek.is-photos,
  .profile-peek.is-friends {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.1rem 0.15rem 0.25rem;
    border-radius: 0;
    background: transparent;
  }
  .profile-peek::-webkit-scrollbar { display: none; }
  .profile-peek.is-photos .profile-photo-cell {
    flex: 0 0 78%;
    max-width: 220px;
    border-radius: 12px;
    scroll-snap-align: start;
  }
  .profile-peek.is-friends .profile-friend-cell {
    flex: 0 0 46%;
    max-width: 140px;
    scroll-snap-align: start;
  }
  .profile-peek-nav {
    display: none;
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 2;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 4px 14px rgba(12, 32, 22, 0.18);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }
  .profile-peek-wrap.has-overflow .profile-peek-nav { display: inline-flex; }
  .profile-peek-nav.is-prev { left: -0.15rem; }
  .profile-peek-nav.is-next { right: -0.15rem; }
  .profile-peek-nav:disabled { opacity: 0.35; cursor: default; }
  .profile-actions { margin-left: 0; width: 100%; }
  .profile-headband {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .profile-timeline .post,
  .profile-timeline .post-media-grid,
  .profile-timeline .post-carousel,
  .profile-timeline .post-body,
  .profile-timeline .comment-photos {
    max-width: 100%;
  }
  .tag-share-banner p { min-width: 0; }
}

.mention-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.mention-link:hover {
  color: #a67820;
  text-decoration: underline;
}
.mention-field {
  position: relative;
  width: 100%;
  min-width: 0;
}
.comment-compose .mention-field,
.comment-form .mention-field.is-comment {
  flex: 1;
}
.mention-editor {
  width: 100%;
  min-width: 0;
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--ink);
  caret-color: var(--ink);
}
.mention-editor.is-empty:before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.mention-field.is-composer .mention-editor {
  min-height: 88px;
  font-size: 1.05rem;
  line-height: 1.45;
}
.mention-field.is-comment .mention-editor,
.mention-field.is-inline .mention-editor {
  min-height: 1.25rem;
  max-height: 7.5rem;
  overflow-y: auto;
}
.mention-field textarea.mention-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
  resize: none;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.mention-chip {
  display: inline;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 0.35em;
  padding: 0.05em 0.22em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.mention-menu {
  position: fixed;
  z-index: 240;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(12, 22, 17, 0.18);
  padding: 0.35rem;
  max-height: 240px;
  overflow: auto;
}
.mention-menu[hidden] { display: none !important; }
.mention-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
.mention-option:hover,
.mention-option.is-on { background: var(--brand-soft); }
.mention-av {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.mention-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mention-meta { display: flex; flex-direction: column; min-width: 0; }
.mention-meta strong { font-size: 0.9rem; line-height: 1.2; }
.mention-meta em { font-style: normal; color: var(--muted); font-size: 0.78rem; }
.viewer-tag-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.viewer-tag-pin {
  position: absolute;
  transform: translate(-50%, -120%);
  background: rgba(16, 28, 22, 0.88);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: auto;
  text-decoration: none;
}
.viewer.is-tagging .viewer-frame { cursor: crosshair; }
.viewer.is-tagging #viewer-img { outline: 2px dashed rgba(255,255,255,0.45); outline-offset: -6px; }
.report-issue-page { padding: 1.5rem 0 3rem; }
.report-issue-form .field { margin-bottom: 0.9rem; }
.report-issue-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.by-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin: 0.4rem 0 1rem;
}
.by-filters a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.by-filters a.is-active { color: var(--brand-deep); text-decoration: underline; }
.by-trace {
  margin: 0.45rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #0f1713;
  color: #d7ebe0;
  font-size: 0.75rem;
  overflow: auto;
  max-height: 280px;
  white-space: pre-wrap;
}
.by-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  align-items: center;
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.by-bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 0.35rem;
  cursor: pointer;
}
.by-error-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  cursor: pointer;
  max-width: 100%;
}
.by-error-check input { margin-top: 0.3rem; flex-shrink: 0; }
.by-ignore-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
  align-items: center;
}
.by-ignore-add input[type="text"] {
  min-width: 12rem;
  flex: 1 1 14rem;
}
.by-ignore-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.by-ignore-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfb;
}
.by-ignore-list li.is-inactive {
  opacity: 0.72;
  background: #f3f5f4;
}
.by-ignore-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  min-width: 0;
}
.by-ignore-main code {
  font-size: 0.82rem;
  word-break: break-word;
}
.by-ignore-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.activity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.activity-tabs a {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.7);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
}
.activity-tabs a:hover { background: var(--paper); color: var(--ink); }
.activity-tabs a.is-on {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}
.activity-badge {
  flex: 0 0 auto;
  min-width: 4.6rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #e8eef0;
  color: #3a4f44;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}
.activity-badge-post { background: #d7ebe0; color: #0d3a28; }
.activity-badge-comment { background: #e7f2f8; color: #2d6a8a; }
.activity-badge-reaction { background: #f5e8c8; color: #8a6a16; }
.activity-page { padding: 1.5rem 0 3rem; }
.activity-head { margin-bottom: 1.1rem; }
.activity-head h1 { margin: 0 0 0.35rem; }
.activity-head p { margin: 0; color: var(--muted); max-width: 38rem; }
.activity-section { margin-bottom: 1rem; }
.activity-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-item-rich {
  flex-direction: column;
  gap: 0.7rem;
}
.activity-preview {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.activity-preview-head {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}
.activity-snippet-full {
  -webkit-line-clamp: 5;
  margin-bottom: 0.55rem;
  white-space: pre-wrap;
}
.activity-muted { color: var(--muted); font-style: italic; }
.activity-thumbs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.activity-thumbs .activity-thumb {
  width: 88px;
  height: 88px;
}
.activity-item-rich .activity-actions {
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  padding-left: 0;
}
.activity-danger { color: var(--danger) !important; }
.activity-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  display: block;
}
.activity-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.activity-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.85rem;
}
.activity-main { flex: 1; min-width: 0; }
.activity-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  line-height: 1.35;
}
.activity-snippet {
  margin: 0 0 0.25rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.activity-when {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.activity-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}
.activity-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
@media (max-width: 600px) {
  .activity-item { flex-wrap: wrap; }
  .activity-actions {
    flex-direction: row;
    width: 100%;
    padding-left: calc(56px + 0.75rem);
  }
}
.cover-sheet { width: min(720px, 100%); }
.cover-size-hint {
  margin: -0.35rem 0 0.75rem;
  text-align: left;
}
.cover-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 420;
  margin-top: 0.15rem;
  border-radius: 12px;
  overflow: hidden;
  background: #10261c;
  touch-action: none;
  cursor: grab;
}
.cover-stage canvas { width: 100%; height: 100%; display: block; }
.cover-stage .pf-empty { border-radius: 12px; }
.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; margin-bottom: 0.85rem; }
.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: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
}

.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: minmax(0, 1fr); }
  .side-left { display: none; }
  .side-right { display: block; order: -1; }
}
.app-grid > * { min-width: 0; max-width: 100%; }

@media (min-width: 981px) {
  .side-left,
  .side-right {
    position: sticky;
    top: calc(var(--nav-h) + 1rem);
    align-self: start;
    max-height: calc(100dvh - var(--nav-h) - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .side-left::-webkit-scrollbar,
  .side-right::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  .side-left:hover,
  .side-right:hover {
    scrollbar-width: thin;
  }
  .side-left:hover::-webkit-scrollbar,
  .side-right:hover::-webkit-scrollbar {
    width: 6px;
  }
  .side-left:hover::-webkit-scrollbar-thumb,
  .side-right:hover::-webkit-scrollbar-thumb {
    background: rgba(20, 36, 28, 0.28);
    border-radius: 999px;
  }
  .side-left:hover::-webkit-scrollbar-track,
  .side-right:hover::-webkit-scrollbar-track {
    background: transparent;
  }
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.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-you { font-weight: 650; color: var(--ink); }
.side-you .avatar { width: 28px; height: 28px; font-size: 0.75rem; }
.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.58);
}
.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,
.composer-form .mention-editor {
  width: 100%;
  min-height: 88px;
  border: 0;
  resize: vertical;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: transparent;
}
.composer-form textarea:focus,
.composer-form .mention-editor:focus { outline: none; }
.composer-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.35rem;
}
.composer-emoji {
  position: relative;
}
.composer-emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.composer-emoji-btn:hover,
.composer-emoji-btn[aria-expanded="true"] {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}
.composer-emoji-btn > span:first-child {
  font-size: 1.15rem;
  line-height: 1;
}
.composer-emoji-panel {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  width: min(320px, calc(100vw - 3rem));
  max-height: 220px;
  overflow: auto;
  padding: 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(10, 28, 20, 0.18);
}
.composer-emoji-panel[hidden] { display: none !important; }
.composer-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.15rem;
}
.composer-emoji-item {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.composer-emoji-item:hover,
.composer-emoji-item:focus-visible {
  background: var(--brand-soft);
  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); }
.upload-bar {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + var(--tabbar-h, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 140;
  width: min(420px, calc(100vw - 1.5rem));
  transform: translateX(-50%);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(13, 58, 40, 0.16);
}
.upload-bar[hidden] { display: none !important; }
.upload-bar-copy {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}
.upload-bar-copy strong { font-size: 0.92rem; }
.upload-bar-copy span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.upload-bar-track {
  height: 6px;
  margin: 0.55rem 0 0.35rem;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.upload-bar-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--brand);
  transition: width 160ms ease;
}
.upload-bar[data-kind="good"] .upload-bar-track i { background: var(--success); }
.upload-bar[data-kind="bad"] .upload-bar-track i { background: var(--danger); }
.upload-bar-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.upload-bar-link {
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
@media (min-width: 801px) {
  .upload-bar { bottom: 1.25rem; }
}
.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 {
  max-width: 11.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.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-wrap {
  position: relative;
  display: inline-flex;
}
.composer-place-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 8;
  min-width: 240px;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(21, 62, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.composer-place-menu[hidden] { display: none !important; }
.composer-place-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}
.composer-place-menu button:hover {
  background: var(--surface-2);
}
.composer-place {
  margin: 0.45rem 0 0;
}
.composer-place input {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0.1rem 0.15rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: transparent;
}
.composer-place input:focus {
  outline: none;
  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;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.post-media-grid.media-count-1 {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  width: 100%;
}
.hashtag-link, .hashtag-editor { color: var(--brand); font-weight: 700; }
.post-media {
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0;
  background: #e7eee9;
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  max-width: 100%;
}
button.post-media {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: zoom-in;
}
a.post-media.reel-tease {
  display: block;
  width: 100%;
  max-width: 100%;
  text-decoration: none;
}
.post-media-grid.media-count-1 .post-media {
  aspect-ratio: 4 / 5;
  width: min(100%, calc(min(640px, 85vw) * 4 / 5));
  max-width: 100%;
  height: auto;
  justify-self: center;
}
.post-media-grid .post-media img,
.post-carousel .post-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: transparent;
  display: block;
}
.post-media-grid .post-media video,
.post-carousel .post-media video,
.post-media-grid .reel-tease video,
.post-carousel .reel-tease video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  background: #0b140f;
  display: block;
}
.post-carousel {
  position: relative;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e7eee9;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  touch-action: pan-y;
}
.post-carousel-viewport {
  overflow: hidden;
  width: 100%;
}
.post-carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.28s ease;
  will-change: transform;
}
.post-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  max-width: 100%;
}
.post-carousel .post-media {
  aspect-ratio: 4 / 5;
  max-height: min(640px, 85vw);
  width: 100%;
}
/* Photos keep their full content without a fixed portrait letterbox. */
.post-media-grid.media-count-1 .post-media:has(img) {
  aspect-ratio: auto;
  width: 100%;
}
.post-media-grid.media-count-1 .post-media img {
  height: auto;
}
.post-carousel.has-proportional-photo .post-carousel-track,
.post-carousel.has-proportional-photo .post-carousel-slide {
  height: 100%;
}
.post-carousel.has-proportional-photo .post-media {
  aspect-ratio: auto;
  height: 100%;
  max-height: none;
}
.post-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(12, 40, 24, 0.16);
  display: none;
  align-items: center;
  justify-content: center;
}
.post-carousel-nav:disabled { opacity: 0.35; cursor: default; }
.post-carousel-nav.is-prev { left: 0.55rem; }
.post-carousel-nav.is-next { right: 0.55rem; }
@media (hover: hover) and (pointer: fine) {
  .post-carousel-nav { display: inline-flex; }
}
.post-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  display: flex;
  justify-content: center;
  gap: 0.28rem;
  pointer-events: none;
  z-index: 2;
}
.post-carousel-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.post-carousel-dot.is-active { background: #fff; }
.post-carousel-count {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  background: rgba(12, 24, 18, 0.62);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}
.pymk {
  margin-top: 1rem;
  padding: 0.95rem 1rem 1.05rem;
}
.pymk-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}
.pymk-head p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.pymk-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(138px, 156px);
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
}
.pymk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 0.85rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.pymk-dismiss {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 24, 18, 0.08);
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.pymk-dismiss:hover {
  background: rgba(12, 24, 18, 0.16);
  color: var(--ink);
}
.pymk-name {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.25;
}
.pymk-name:hover { color: var(--brand-deep); }
.pymk-reason {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
  min-height: 2em;
}
.post.is-suggested {
  border-top: 1px solid var(--line);
}
.post-suggest-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  margin: 0.55rem 0 0.15rem;
  padding: 0.35rem 0 0.55rem;
  border-bottom: 1px solid var(--line);
}
.post-suggest-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-suggest-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.post-suggest-actions .btn-sm {
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
}

/* Facebook-style shimmer + blurry → sharp fade-in */
@keyframes media-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.media-skel:not(.is-ready) {
  background:
    linear-gradient(
      110deg,
      #dce6df 0%,
      #dce6df 35%,
      #eef3ef 50%,
      #dce6df 65%,
      #dce6df 100%
    );
  background-size: 200% 100%;
  animation: media-shimmer 1.15s ease-in-out infinite;
}
.media-fade {
  opacity: 0;
  filter: blur(12px);
  transform: scale(1.02);
  transition: opacity 0.3s ease, filter 0.35s ease, transform 0.35s ease;
}
.media-fade.is-ready {
  opacity: 1;
  filter: none;
  transform: none;
}
/* Prefer-reduced-motion: skip blur, still fade */
@media (prefers-reduced-motion: reduce) {
  .media-skel:not(.is-ready) { animation: none; }
  .media-fade { filter: none; transform: none; }
}
.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); }
.media-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.media-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem;
  background: var(--surface);
}
.media-card img,
.media-card video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-2);
  display: block;
}
.media-where {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.media-note {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.btn-small { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.invite-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.invite-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.invite-table th, .invite-table td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.invite-email { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; }
.invite-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.invite-pager-label { color: var(--muted); font-size: 0.88rem; }
.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}
.invite-preview {
  width: 100%;
  height: 440px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.invite-notes { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.invite-link-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.invite-link-row input {
  flex: 1 1 220px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}
.comment-form:not(.comment-shell) {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.comment-compose {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.comment-form:not(.comment-shell) .comment-body {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  min-width: 0;
}
.comment-photo-add { position: relative; cursor: pointer; }
.comment-photo-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.comment-attach {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.comment-attach[hidden] { display: none !important; }
.comment-attach-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #e7eee9;
}
.comment-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.comment-attach-x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 28, 22, 0.72);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}
.comment-photos {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 240px;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.comment-photo {
  border: 0;
  padding: 0;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}
.comment-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}
.comment-status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.comment-status[data-kind="bad"] { color: var(--danger); }
.comment-form.is-busy {
  opacity: 0.92;
  pointer-events: none;
}
.comment-form.is-drop {
  outline: 2px dashed var(--brand);
  outline-offset: 3px;
  border-radius: 14px;
}
.comment-form.is-busy .comment-attach-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: inherit;
}
.comment-del { color: var(--danger) !important; }
.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 {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
.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);
  max-height: min(70vh, 560px);
  overflow-y: auto;
}
.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-feedback-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0.25rem 0;
  padding: 0.35rem 0.45rem;
}
.post-feedback-details summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
}
.post-feedback-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
}
.post-menu .post-feedback-target button {
  width: auto;
  padding: 0.24rem 0.42rem;
  color: var(--brand);
  font-size: 0.75rem;
}
.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;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  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);
  max-width: calc(100vw - 2rem);
}
.feed-toast[hidden] { display: none !important; }
.feed-toast-undo {
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.post-hidden-card {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.post-hidden-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.post-meta { flex: 1; min-width: 0; }
.post-meta .name {
  font-weight: 600;
  color: var(--ink);
  display: block;
}
.post-meta .when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.vis-icon-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  vertical-align: middle;
}
.vis-icon-btn:hover { color: var(--brand-deep); }
.privacy-modal[hidden] { display: none !important; }
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.privacy-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 18, 0.45);
}
.privacy-sheet {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 18px 50px rgba(10, 24, 16, 0.28);
}
.privacy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.privacy-head h2 { margin: 0; font-size: 1.15rem; }
.privacy-x {
  border: 0;
  background: #eef3f0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.privacy-option {
  display: block;
  margin: 0.45rem 0;
  cursor: pointer;
}
.privacy-option input { position: absolute; opacity: 0; pointer-events: none; }
.privacy-option-ui {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.privacy-option-ui strong { display: block; }
.privacy-option-ui em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.1rem;
}
.privacy-option-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: #eef5f0;
  display: grid;
  place-items: center;
  color: var(--brand-deep);
  flex: 0 0 auto;
}
.privacy-option-icon svg { width: 1.15rem; height: 1.15rem; }
.privacy-option input:checked + .privacy-option-ui {
  border-color: var(--brand);
  background: #f2faf5;
}
.privacy-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.report-modal[hidden] { display: none !important; }
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 18, 0.45);
}
.report-sheet {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100dvh - 2rem - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 18px 50px rgba(10, 24, 16, 0.28);
}
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.report-head h2 { margin: 0; font-size: 1.15rem; }
.report-x {
  border: 0;
  background: #eef3f0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.report-reasons {
  border: 0;
  margin: 0.65rem 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.report-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.report-option:has(input:checked) {
  border-color: var(--brand);
  background: #f2faf5;
}
.report-option input { accent-color: var(--brand); }
.report-details-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}
.report-details-label .muted {
  font-weight: 400;
  color: var(--muted);
}
.report-sheet textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.saved-page { padding: 1.5rem 0 3rem; }
.org-page,
.org-index { padding: 1.25rem 0 3rem; }
.org-hero { overflow: hidden; padding: 0; }
.org-hero-banner {
  position: relative;
  aspect-ratio: 3 / 1;
  height: auto;
  min-height: 0;
  background:
    linear-gradient(120deg, rgba(26, 92, 64, 0.92), rgba(47, 138, 95, 0.72) 48%, rgba(212, 164, 55, 0.55));
  overflow: hidden;
}
.org-hero-banner.has-photo { background: #10261c; }
.org-hero-banner .cover-view,
.org-hero-banner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.org-hero-banner .cover-edit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
}
.org-logo-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-top: -2.4rem;
}
.org-logo-wrap .avatar.xl {
  border: 3px solid var(--paper);
  box-shadow: 0 6px 18px rgba(12, 40, 24, 0.12);
}
.org-card-banner {
  height: 84px;
  background:
    linear-gradient(135deg, rgba(26, 92, 64, 0.55), rgba(14, 48, 32, 0.4)),
    #1a5c40;
  overflow: hidden;
}
.org-hero-body {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 1rem 1.15rem 1.1rem;
}
.org-hero-identity {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
}
.org-logo.avatar.xl {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  margin-top: -2.2rem;
  background: #e8eef5;
  color: #1e3f66;
  flex: 0 0 auto;
}
.org-hero-identity h1 { margin: 0.1rem 0 0.15rem; }
.org-handle {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}
.org-desc {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
}
.org-card-body {
  position: relative;
  padding-top: 0.35rem;
}
.org-card-logo {
  width: 48px;
  height: 48px;
  margin: -1.85rem 0 0.55rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 1.05rem;
}
.org-card-handle {
  margin: -0.15rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.org-card-banner.has-photo {
  background: #10261c;
}
.org-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.org-link { margin: 0.35rem 0 0; font-size: 0.92rem; }
.org-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.org-pending-note {
  margin: 0 1.15rem 1rem;
  padding: 0.75rem 0.9rem;
  background: #fff8e8;
  border: 1px solid #f0e0b8;
  border-radius: 12px;
  color: #6a5520;
  font-size: 0.92rem;
}
.org-pending-note span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  opacity: 0.9;
}
.org-admin {
  padding: 0 1.15rem 1.1rem;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.org-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.85rem;
  cursor: pointer;
  font-size: 0.92rem;
}
.page-username-row {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.page-username-prefix {
  padding: 0.55rem 0.65rem;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 650;
  font-size: 0.9rem;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.page-username-row input {
  border: 0 !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 0;
}
[data-username-status].is-good { color: var(--brand-deep); }
[data-username-status].is-bad { color: #b42318; }
.org-feed .empty { padding: 1.25rem; }
.field .muted { font-weight: 400; color: var(--muted); }
.comment-shell {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-top: 0.65rem;
}
.comment-form[hidden],
.comment-reply-form[hidden] {
  display: none !important;
}
.comment-shell-av {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
  flex: 0 0 auto;
  text-decoration: none;
  margin-top: 0;
}
.comment-shell-box {
  flex: 1;
  min-width: 0;
  background: #f0f2f5;
  border-radius: 18px;
  padding: 0.45rem 0.65rem 0.3rem;
  border: 0;
}
.comment-shell .comment-body {
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  min-height: 1.25rem;
  max-height: 7.5rem;
  padding: 0.2rem 0.1rem 0.25rem;
  margin: 0;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.3333;
  color: #050505;
  outline: none;
  box-shadow: none;
}
.comment-shell .comment-body::placeholder {
  color: #65676b;
  opacity: 1;
}
.comment-shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  min-height: 1.75rem;
  margin-top: 0.05rem;
}
.comment-shell-tools {
  display: flex;
  align-items: center;
  gap: 0;
}
.comment-tool {
  position: relative;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: #65676b;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.comment-tool:hover { background: rgba(0, 0, 0, 0.05); color: #050505; }
.comment-tool svg { width: 1rem; height: 1rem; display: block; }
.comment-tool input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.comment-send {
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #bcc0c4;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.comment-send svg { width: 1rem; height: 1rem; display: block; }
.comment-shell.has-text .comment-send,
.comment-shell.has-files .comment-send {
  color: var(--brand);
}
.comment-send:hover { background: rgba(0, 0, 0, 0.05); }
.comment-reply-form.comment-shell {
  margin: 0.35rem 0 0;
  max-width: none;
}
.comment-reply-form .comment-shell-av {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}
.comment-reply-form .comment-shell-box { background: #f0f2f5; }
.vis-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex: 0 0 auto;
}
.vis-icon svg { width: 14px; height: 14px; display: block; }
.post-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.55rem 0 0.7rem;
}
.post-edit-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 9rem;
}
.post-edit-row select {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  background: #fff;
}
.post-body {
  color: var(--ink);
  white-space: pre-wrap;
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tag-share-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.85rem;
  background: #eef6f1;
  border: 1px solid #cfe3d6;
  border-radius: 12px;
}
.tag-share-banner p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  flex: 1;
  min-width: 12rem;
}
.tag-share-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.tag-share-note {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.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;
  align-items: center;
  flex-shrink: 0;
  padding-right: 0.15rem;
}
.rx-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: -6px;
  border: 2px solid #fff;
  background: var(--surface-2);
  overflow: hidden;
  box-sizing: border-box;
}
.rx-dot:last-child { margin-right: 0; }
.rx-dot { font-size: 0.78rem; 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-dot,
.comment-rx-tally,
.rx-bar .rx-stack,
[data-rx] > .reel-count { cursor: pointer; }
.rx-who {
  position: fixed;
  z-index: 120;
  min-width: 10rem;
  max-width: 16rem;
  padding: 0.55rem 0.7rem 0.6rem;
  border-radius: 8px;
  background: #3a3b3c;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  font-size: 0.82rem;
  line-height: 1.25;
  pointer-events: auto;
}
.rx-who[hidden] { display: none !important; }
.rx-who-head {
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #e4e6eb;
}
.rx-who-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rx-who-list li { padding: 0.08rem 0; }
.rx-who-more {
  margin: 0.35rem 0 0;
  color: #b0b3b8;
  font-size: 0.78rem;
}
.rx-bar { border-top: 1px solid var(--line); padding-top: 0.35rem; }
.rx-hold { position: relative; display: inline-flex; }
[data-rx-main] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.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,
.comment-unit.is-open .rx-tray { display: block; }
/* Touch devices keep :hover stuck; only show tray when explicitly open. */
@media (hover: none) {
  .rx-hold:hover .rx-tray { display: none; }
  .rx.is-open .rx-tray,
  .comment-unit.is-open .rx-tray { display: block; }
}
.rx-tray-inner {
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(13, 58, 40, 0.16);
  animation: rx-tray-in 0.16s ease-out;
}
@keyframes rx-tray-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rx-pop {
  0% { transform: scale(0.25) translateY(12px); opacity: 0; }
  55% { transform: scale(1.22) translateY(-3px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.rx-hold:hover .rx-pick-ico,
.rx.is-open .rx-pick-ico,
.comment-unit.is-open .rx-pick-ico {
  display: inline-block;
  animation: rx-pop 0.42s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}
.rx-pick:nth-child(1) .rx-pick-ico { animation-delay: 0.02s; }
.rx-pick:nth-child(2) .rx-pick-ico { animation-delay: 0.07s; }
.rx-pick:nth-child(3) .rx-pick-ico { animation-delay: 0.12s; }
.rx-pick:nth-child(4) .rx-pick-ico { animation-delay: 0.17s; }
.rx-pick {
  appearance: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  color: var(--ink-soft);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  padding: 0;
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.rx-pick-ico {
  display: inline-block;
  line-height: 1;
}
.rx-pick-label {
  position: absolute;
  bottom: calc(100% + 8px);
  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;
  transition: opacity 0.12s ease;
}
.rx-pick:hover {
  z-index: 2;
}
.rx-pick:hover .rx-pick-label {
  opacity: 1;
}
@keyframes rx-amen-act {
  0%, 100% { transform: translateY(-4px) rotate(0) scale(1.12); }
  25% { transform: translateY(-10px) rotate(-14deg) scale(1.18); }
  50% { transform: translateY(-6px) rotate(12deg) scale(1.12); }
  75% { transform: translateY(-11px) rotate(-8deg) scale(1.2); }
}
@keyframes rx-pray-act {
  0%, 100% { transform: translateY(-4px) scale(1.1); }
  40% { transform: translateY(2px) scale(0.92, 1.08); }
  70% { transform: translateY(-8px) scale(1.16, 0.96); }
}
@keyframes rx-love-act {
  0%, 100% { transform: translateY(-4px) scale(1.08); }
  14% { transform: translateY(-8px) scale(1.32); }
  28% { transform: translateY(-4px) scale(1.08); }
  42% { transform: translateY(-9px) scale(1.28); }
  58% { transform: translateY(-4px) scale(1.08); }
}
@keyframes rx-encourage-act {
  0%, 100% { transform: translateY(-4px) rotate(0) scale(1.12); }
  30% { transform: translateY(-6px) rotate(-18deg) scale(1.18, 0.92); }
  60% { transform: translateY(-6px) rotate(18deg) scale(0.92, 1.18); }
}
.rx-pick.amen:hover .rx-pick-ico,
.rx-hold:hover .rx-pick.amen:hover .rx-pick-ico,
.rx.is-open .rx-pick.amen:hover .rx-pick-ico,
.comment-unit.is-open .rx-pick.amen:hover .rx-pick-ico {
  animation: rx-amen-act 0.55s ease-in-out infinite;
}
.rx-pick.pray:hover .rx-pick-ico,
.rx-hold:hover .rx-pick.pray:hover .rx-pick-ico,
.rx.is-open .rx-pick.pray:hover .rx-pick-ico,
.comment-unit.is-open .rx-pick.pray:hover .rx-pick-ico {
  animation: rx-pray-act 0.75s ease-in-out infinite;
}
.rx-pick.love:hover .rx-pick-ico,
.rx-hold:hover .rx-pick.love:hover .rx-pick-ico,
.rx.is-open .rx-pick.love:hover .rx-pick-ico,
.comment-unit.is-open .rx-pick.love:hover .rx-pick-ico {
  animation: rx-love-act 0.7s ease-in-out infinite;
}
.rx-pick.encourage:hover .rx-pick-ico,
.rx-hold:hover .rx-pick.encourage:hover .rx-pick-ico,
.rx.is-open .rx-pick.encourage:hover .rx-pick-ico,
.comment-unit.is-open .rx-pick.encourage:hover .rx-pick-ico {
  animation: rx-encourage-act 0.28s ease-in-out infinite;
}
.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;
  filter: grayscale(1);
  opacity: 0.72;
}
.rx-main.is-on .rx-main-ico {
  filter: none;
  opacity: 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.5rem; }
.comment-thread { margin-top: 0.5rem; }
.comment {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.3333;
}
.comment-thread > .comment { margin-top: 0; }
.comment-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
  flex: 0 0 auto;
  text-decoration: none;
}
.comment-avatar.avatar { width: 32px; height: 32px; font-size: 0.72rem; }
.comment.is-reply .comment-avatar {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}
.comment-author {
  color: inherit;
  text-decoration: none;
}
.comment-author:hover strong { text-decoration: underline; }
.comment-replies {
  margin: 0.3rem 0 0;
  padding-left: 0;
  border-left: 0;
}
.comment-replies .comment { margin-top: 0.4rem; }
.comment-reply-form {
  margin: 0.35rem 0 0;
  max-width: none;
}
.comment-main {
  flex: 1;
  min-width: 0;
}
.comment-unit {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}
.comment-cluster {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.comment-more-wrap {
  position: absolute;
  top: 50%;
  left: 100%;
  margin-left: 0.35rem;
  transform: translateY(-50%);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.comment:hover .comment-more-wrap,
.comment-more-wrap.is-open {
  opacity: 1;
  pointer-events: auto;
}
.comment-more {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0 0.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #65676b;
  box-shadow: none;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline;
}
.comment-more:hover,
.comment-more-wrap.is-open .comment-more {
  background: transparent;
  color: #050505;
}
.comment-menu {
  top: calc(100% + 4px);
  right: 0;
  min-width: 168px;
  z-index: 12;
}
.comment .bubble {
  background: #f0f2f5;
  border-radius: 18px;
  padding: 0.4rem 0.75rem;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: min(100%, 36rem);
  color: #050505;
}
.comment .bubble.has-photo {
  padding: 0.4rem 0.55rem 0.5rem;
}
.comment .bubble strong {
  color: #050505;
  font-weight: 600;
  font-size: 0.8125rem;
}
.comment .bubble .comment-author {
  display: block;
  line-height: 1.25;
}
.comment .bubble [data-comment-text] {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.9375rem;
  word-break: break-word;
}
.comment .bubble [data-comment-text]:empty { display: none; }
.comment-foot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.12rem 0 0 0.75rem;
  min-height: 1.15rem;
  max-width: 100%;
}
.comment-foot .comment-meta {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.comment-unit .rx-hold { position: relative; display: inline-flex; }
.comment-unit .rx-tray { z-index: 40; }
.comment-like.rx-main {
  padding: 0;
  gap: 0;
  min-height: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #65676b;
  background: transparent;
  border-radius: 0;
}
.comment-like.rx-main:hover {
  background: transparent;
  color: #050505;
  text-decoration: underline;
}
.comment-like.rx-main.is-on { font-weight: 700; }
.comment-like.rx-main.is-on.amen { color: #c4922a; }
.comment-like.rx-main.is-on.pray { color: #2d6a8a; }
.comment-like.rx-main.is-on.love { color: #b42318; }
.comment-like.rx-main.is-on.encourage { color: #1a7a4c; }
.comment-rx-tally {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  margin-left: auto;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.comment-rx-tally[hidden] { display: none !important; }
.comment-rx-tally .rx-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: #65676b;
}
.comment-rx-tally .rx-dot {
  width: 22px;
  height: 22px;
  font-size: 0.85rem;
  margin-right: -4px;
}
.comment-rx-tally .rx-dot:last-child { margin-right: 0; }
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.15rem 0 0 0.75rem;
}
.comment-when,
.comment-edited {
  font-size: 0.75rem;
  font-weight: 600;
  color: #65676b;
}
.comment-meta button:not(.rx-pick) {
  border: 0;
  background: transparent;
  color: #65676b;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.comment-meta button:not(.rx-pick):hover { text-decoration: underline; color: #050505; }
.comment-meta .rx-pick {
  width: 42px;
  height: 42px;
  font-size: 1.45rem;
  font-weight: 400;
  color: inherit;
  background: transparent;
  text-decoration: none;
}
.comment-meta .rx-pick:hover {
  text-decoration: none;
  color: inherit;
}
.comment-meta .comment-del { color: var(--danger) !important; }
.comment-meta .comment-del:hover { color: var(--danger) !important; text-decoration: underline; }
.comment.is-editing .bubble {
  display: block;
  width: 100%;
}
.comment-inline-edit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.3333;
  color: #050505;
  padding: 0.1rem 0 0;
  margin: 0.05rem 0 0;
  outline: none;
  min-height: 1.25rem;
  max-height: 8rem;
}
.comment-inline-edit:disabled {
  opacity: 0.7;
}
.comment-tools { display: none; }

/* 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; }
.rail-compact { display: none; }
.rail-compact a {
  flex: 1;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-deep);
  padding: 0.35rem 0.4rem;
}
.rail-compact a + a { border-left: 1px solid var(--line); }
@media (max-width: 980px) {
  .side-right {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .devotion-rail { padding: 0.35rem 0.5rem; }
  .rail-full { display: none; }
  .rail-compact { display: flex; }
}

/* Landing */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
}
.hero--photo { align-items: end; }
.hero-parallax {
  position: absolute;
  inset: -12% 0 -8%;
  z-index: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1.12);
}
.hero-parallax img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 28, 18, 0.28) 0%, rgba(8, 28, 18, 0.18) 38%, rgba(8, 28, 18, 0.72) 72%, rgba(8, 28, 18, 0.9) 100%),
    linear-gradient(90deg, rgba(8, 28, 18, 0.55) 0%, rgba(8, 28, 18, 0.2) 55%, rgba(8, 28, 18, 0.35) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0 4.25rem;
  color: #f4faf6;
}
.hero .brand {
  color: #fff;
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin-bottom: 0.55rem;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  animation: riseIn 0.9s var(--ease) both;
}
.hero .brand span { color: #f0c14b; }
.hero h1 {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.015em;
  max-width: 22ch;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 0.85rem;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  animation: riseIn 0.9s 0.08s var(--ease) both;
}
.hero .lede {
  max-width: 40ch;
  color: rgba(244, 250, 246, 0.9);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  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;
}
.hero-cta-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.hero-cta-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .hero-parallax { transform: none !important; }
}
@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 .brand {
  display: block;
  font-size: 1.8rem;
  margin: 0 0 0.4rem;
  padding: 0;
  line-height: 1.1;
}
.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;
}
.invite-by {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.invite-by .avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}
.invite-why {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 248, 236, 0.85);
  border: 1px solid var(--line);
}
.invite-why p { margin: 0.4rem 0 0; color: var(--ink); font-size: 0.95rem; }
.invite-why p:first-child { margin-top: 0; }
.invite-why-hook {
  font-weight: 700;
  font-size: 1.02rem;
}
.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; }
}
.birth-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 0.5rem;
}
.birth-row select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  font: inherit;
  color: var(--ink);
  appearance: auto;
}
.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: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  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 .todo-badge {
  flex: 0 0 auto;
}
.by-nav a:hover,
.by-nav a.is-active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.by-main { padding: 1.5rem; }
.by-feed-steps,
.by-feed-notes {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}
.by-feed-steps li,
.by-feed-notes li { margin: 0.35rem 0; }
.by-feed-try textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  margin-bottom: 0.55rem;
  resize: vertical;
}
.by-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.by-topic-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: var(--surface);
}
.by-topic-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}
.by-topic-key {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.by-topic-words {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.by-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.by-table th,
.by-table td {
  text-align: left;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--line);
}
.by-table th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.hb-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hb-card-head h3 { margin: 0; }
.hb-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem 1.1rem;
  margin-top: 0.85rem;
}
.hb-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.hb-value { font-weight: 650; font-size: 0.95rem; }
.hb-sub { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.hb-sub-inline { color: var(--muted); font-weight: 500; font-size: 0.88em; }
.by-user-list { display: flex; flex-direction: column; gap: 0.75rem; }
.by-user-row,
.by-user-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.by-user-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.by-user-row:last-child { border-bottom: 0; padding-bottom: 0; }
.by-user-card { margin: 0; }
.by-user-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.by-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.by-user-identity {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}
.by-user-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}
.by-user-handle { color: var(--muted); font-size: 0.88rem; }
.by-user-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.by-user-meta,
.by-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem 1rem;
}
.by-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}
@media (max-width: 720px) {
  .by-settings-grid { grid-template-columns: 1fr; }
}
.by-feed-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}
.by-feed-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf8;
  cursor: pointer;
}
.by-feed-item input { margin-top: 0.2rem; }
.by-feed-item .field-hint {
  display: block;
  margin: 0.15rem 0 0;
  word-break: break-all;
}
.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.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;
  color: inherit;
  text-decoration: none;
  display: block;
}
a.stat:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(26, 92, 64, 0.12);
}
a.stat.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.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; }
.email-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}
.email-meta > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.5rem;
}
.email-meta dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.email-meta dd { margin: 0; }
.email-preview-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.email-preview-frame iframe {
  width: 100%;
  min-height: 520px;
  border: 0;
  background: #fff;
}
.email-text-body {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
}

.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: flex-start;
  gap: 0.65rem;
  margin: 0.85rem 0 0.55rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.checkbox-row input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.checkbox-row a { font-weight: 600; }
.switch-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.7rem 0;
  cursor: pointer;
  user-select: none;
}
.switch-copy { font-size: 0.95rem; line-height: 1.35; color: var(--ink-soft); }
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 1.45rem;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.switch-ui {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c9d5ce;
  transition: background 0.18s ease;
}
.switch-ui::after {
  content: '';
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 30, 22, 0.25);
  transition: transform 0.18s ease;
}
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(1.15rem); }
.switch input:focus-visible + .switch-ui {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.username-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.username-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  background: #f3f7f4;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}
.username-field input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}
.settings-unsaved {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  background: #12261c;
  color: #e8f4ec;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(10, 24, 16, 0.28);
  font-size: 0.92rem;
  font-weight: 600;
}
.settings-unsaved[hidden] { display: none !important; }
.settings-unsaved .btn-ghost {
  color: #d7ebe0;
  border-color: rgba(255,255,255,0.18);
}
.settings-page.has-unsaved { padding-bottom: 5.5rem; }
.settings-page-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.15rem;
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 5rem;
  align-items: start;
}
.settings-side-nav {
  position: sticky;
  top: calc(var(--nav-h) + 0.85rem);
  min-width: 0;
}
.settings-side-nav-inner {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 0 8px 24px rgba(12, 40, 24, 0.04);
}
.settings-side-nav-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-nav-groups {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.settings-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.45rem 0 0.35rem;
  border-bottom: 1px solid var(--line);
}
.settings-nav-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.settings-nav-group--single { padding-top: 0.3rem; }
.settings-nav-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0 0.55rem 0.2rem;
}
.settings-side-nav-link {
  display: block;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3;
}
.settings-side-nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.settings-side-nav-link.is-active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 650;
}
.settings-main-col { min-width: 0; }
.settings-page-head {
  margin-bottom: 1rem;
}
.settings-page-head h1 { margin: 0 0 0.25rem; }
.settings-page-head p {
  margin: 0;
  color: var(--muted);
}
.settings-section {
  margin-top: 0;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.settings-section-hidden { display: none !important; }
.settings-section-title {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}
@media (max-width: 900px) {
  .settings-page-layout {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    overflow-x: clip;
  }
  .settings-side-nav {
    position: static;
  }
  .settings-side-nav-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  .settings-side-nav-title { display: none; }
  .settings-nav-groups {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .settings-nav-group {
    flex-direction: row;
    flex-wrap: nowrap;
    border: 0;
    padding: 0;
    gap: 0.35rem;
    flex-shrink: 0;
  }
  .settings-nav-group-label { display: none; }
  .settings-side-nav-link {
    display: inline-block;
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: 0.85rem;
  }
}
.feed-taste-summary {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.45;
}
.feed-taste-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.85rem;
}
@media (max-width: 640px) {
  .feed-taste-cols { grid-template-columns: 1fr; }
}
.feed-taste h4 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}
.feed-taste-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.feed-taste-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 600;
  font-size: 0.92rem;
}
.feed-taste-actions {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.feed-taste-add {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1rem;
}
.feed-taste-add select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  background: var(--paper);
}
.feed-taste-other { margin-top: 1rem; }
.feed-taste-reset { margin-top: 0.85rem; }
.mute-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.mute-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
}
.mute-who {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.mute-handle {
  color: var(--muted);
  font-size: 0.86rem;
}
.mute-who .field-hint { margin: 0.15rem 0 0; }
.mention-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.mention-link:hover {
  color: #a67820;
  text-decoration: underline;
}
.autolink {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  word-break: break-word;
}
.autolink:hover { color: var(--brand); }
.profile-compose {
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7faf8;
  padding: 0.75rem 0.85rem;
}
.profile-compose .compose-prompt {
  background: #fff;
}
.wall-compose {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7faf8;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.wall-compose:hover { background: #eef5f0; }
.wall-compose span:last-child { color: var(--muted); }
.post-story a { color: inherit; font-weight: 700; }

.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; }
.changelog-intro { color: var(--muted); }
.changelog-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.25rem;
}
.changelog-entry { padding: 1rem 1.1rem; }
.changelog-entry[hidden] { display: none !important; }
.changelog-entry h2 {
  margin: 0;
  font-size: 1rem;
}
.changelog-entry pre {
  margin: 0.65rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.changelog-more {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.changelog-more p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-mini {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}
#bio { scroll-margin-top: calc(var(--nav-h) + 1rem); }

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

body.account-open { overflow: hidden; }
.account-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(10, 22, 16, 0.45);
}
.account-backdrop[hidden] { display: none !important; }
.account-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(360px, 92vw);
  height: 100%;
  background: var(--paper);
  box-shadow: -16px 0 40px rgba(13, 40, 28, 0.16);
  transform: translateX(104%);
  transition: transform 0.22s var(--ease);
  overflow: auto;
  padding: 0.85rem 1rem 1.4rem;
}
.account-drawer.is-open { transform: translateX(0); }
.account-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.account-drawer-head strong { font-size: 1.05rem; }
.account-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.5rem;
  cursor: pointer;
}
.account-me {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.35rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.account-me strong { display: block; font-size: 1.05rem; }
.account-me em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.82rem;
}
.account-links { display: flex; flex-direction: column; padding-top: 0.45rem; }
.account-links a {
  padding: 0.72rem 0.35rem;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
}
.account-link-todo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.todo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.34rem;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.account-links a:hover,
.account-links a.is-active { background: var(--brand-soft); color: var(--brand-deep); }
.account-fine {
  margin: 1rem 0.35rem 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.account-fine a { color: var(--muted); font-weight: 600; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.post-story {
  display: block;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.92rem;
}
.rx-bar {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding-right: 0.15rem;
}
.rx-main,
.rx-act {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  cursor: pointer;
}
.rx-act:hover,
.rx-main:hover { background: var(--surface-2); }
.rx-count,
.rx-act span { font-size: 0.92rem; color: var(--muted); }
.rx-main.is-on .rx-count { color: inherit; }
.rx-stack { margin-left: auto; }
.rx-tray { z-index: 30; }
.link-preview {
  margin: 0.55rem 0 0.35rem;
  max-width: 100%;
}
.link-preview-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f7faf8;
}
.link-preview-loading {
  padding: 0.7rem 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.link-preview-inner {
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 72px;
  position: relative;
}
.link-preview-inner:not(:has(.link-preview-media)) {
  grid-template-columns: 1fr;
}
.link-preview-media {
  background: #e7eee9;
  min-height: 72px;
  max-height: 96px;
}
.link-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.link-preview-copy {
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  min-width: 0;
}
.link-preview-site,
.link-card-site {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.link-preview-title,
.link-card-title {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--ink);
}
.link-preview-desc,
.link-card-desc {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-preview-x {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 35, 25, 0.72);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.link-preview-x:hover { background: rgba(15, 35, 25, 0.9); }
.link-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  margin: 0.65rem 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: #f7faf8;
  max-width: 100%;
  min-width: 0;
}
.link-card:not(:has(.link-card-media)) {
  grid-template-columns: 1fr;
}
.link-card:hover { border-color: var(--brand); }
.link-card-media {
  background: #e7eee9;
  min-height: 84px;
  max-height: 110px;
}
.link-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.link-card-copy {
  padding: 0.65rem 0.75rem;
  min-width: 0;
}
.bubble .link-card {
  margin: 0.45rem 0 0;
  grid-template-columns: 72px 1fr;
}
.bubble .link-card-media { max-height: 72px; min-height: 64px; }
.bubble .link-card-title { font-size: 0.86rem; }
.bubble .link-card-desc { -webkit-line-clamp: 1; font-size: 0.78rem; }
@media (max-width: 560px) {
  .link-preview-inner,
  .link-card {
    grid-template-columns: 1fr;
  }
  .link-preview-media,
  .link-card-media {
    max-height: 140px;
    min-height: 100px;
  }
}
.share-embed {
  display: block;
  margin: 0 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  max-width: 100%;
  min-width: 0;
}
.share-embed-head {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  padding: 0.65rem 0.75rem 0;
}
.share-embed-head span { color: var(--muted); font-size: 0.82rem; }
.share-embed p {
  margin: 0.35rem 0.75rem 0.65rem;
  color: var(--ink);
  white-space: pre-wrap;
}
.share-embed img,
.share-embed video {
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  background: #e7eee9;
  pointer-events: none;
}
.share-gone { padding: 0.8rem 0.9rem; color: var(--muted); }
.reel-tease { color: #fff; }
.post-media-grid .reel-tease,
.post-carousel .reel-tease {
  background: #0b140f;
}
.reel-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 16, 12, 0.28);
  pointer-events: none;
}
.reel-play svg {
  width: 54px;
  height: 54px;
  padding: 12px;
  border-radius: 999px;
  background: rgba(8, 16, 12, 0.55);
}
.avatar-plus-wrap { position: relative; display: inline-block; }
.avatar-plus {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: var(--brand, #1a5c40);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 58, 40, 0.25);
  z-index: 2;
}
.profile-photo-wrap .avatar-plus { right: 4px; bottom: 4px; }
.pf-lightbox-plus {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
}
body.viewer-open { overflow: hidden; }
.viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #000;
}
/* Never set display:flex on the base rule — it overrides [hidden] and leaves a
   broken/empty photo theater stuck over the feed on mobile. */
.viewer[hidden],
.viewer.is-closed {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  background: transparent !important;
}
.viewer:not([hidden]):not(.is-closed) {
  display: flex;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.viewer-top-left,
.viewer-top-right {
  position: absolute;
  top: 0.75rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.viewer-top-left { left: 0.75rem; }
.viewer-top-right { right: 0.75rem; }
.viewer-tool {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}
.viewer-tool:hover { background: rgba(255, 255, 255, 0.24); }
.viewer-home {
  background: #fff;
  color: #153e2a;
  overflow: hidden;
}
.viewer-home img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.viewer-photo {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.viewer-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.viewer-photo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
#viewer-img[hidden] { display: none !important; }
.viewer.is-zoomed .viewer-photo img { transition: none; }
.viewer-nav {
  position: absolute;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
}
.viewer-nav { top: 50%; width: 44px; height: 44px; font-size: 1.8rem; transform: translateY(-50%); }
.viewer-prev { left: 0.8rem; }
.viewer-next { right: 0.8rem; }
.viewer-toast {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 6;
  margin: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(16, 22, 18, 0.88);
  color: #fff;
  font-size: 0.88rem;
  pointer-events: none;
}
.viewer-toast[hidden] { display: none !important; }
.viewer-side {
  width: min(420px, 100%);
  background: #fff;
  color: var(--ink);
  overflow: auto;
  position: relative;
  z-index: 3;
}
.viewer.is-fullscreen .viewer-side { display: none; }
.viewer.is-fullscreen .viewer-photo { width: 100%; }
.is-in-viewer { padding: 1rem 1rem 1.4rem; }
/* Keep photos in the tree (visibility only). display:none makes iOS unload
   the bitmap, so the feed comes back as a broken-image icon. */
.is-in-viewer .post-media-grid,
.is-in-viewer .post-carousel {
  visibility: hidden;
  height: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}
.is-in-viewer .post-edit,
.is-in-viewer [data-post-edit-form] { display: none !important; }
.viewer.is-image-only:not([hidden]):not(.is-closed) { display: grid; }
.viewer.is-image-only .viewer-side { display: none; }
.viewer.is-image-only .viewer-photo { width: 100%; }
.post-edit-add { cursor: pointer; }
.post-edit-add input.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;
}
#share-sheet { z-index: 130; }
body.reels-page {
  height: 100dvh;
  overflow: hidden;
  padding-bottom: 0 !important;
  background: #050705;
}
.reel-stage {
  position: relative;
  height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  background: #050705;
}
.reel {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  background: #050705;
}
.reel video {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  background: #000;
}
.reel-broken {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  color: rgba(255,255,255,0.78);
  text-align: center;
  pointer-events: none;
}
.reel-broken[hidden] { display: none !important; }
.reel-mute {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 6;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 18, 12, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.reel-mute svg {
  width: 22px;
  height: 22px;
  display: block;
}
.reel-mute .reel-mute-icon.is-on { display: none; }
.reel-mute.is-sound-on .reel-mute-icon.is-muted { display: none; }
.reel-mute.is-sound-on .reel-mute-icon.is-on { display: block; }
@media (min-width: 800px) {
  .reel-mute { right: calc(50% - 196px); }
}
.reel-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.reel-side {
  position: absolute;
  right: 12px;
  bottom: 18%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  pointer-events: auto;
}
.reel-act {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.55rem;
}
.reel .rx-main { color: rgba(255, 255, 255, 0.72); background: transparent; padding: 0; }
.reel .rx-main .rx-main-ico { filter: grayscale(1); opacity: 0.85; }
.reel .rx-main.is-on { color: #fff; }
.reel .rx-main.is-on .rx-main-ico { filter: none; opacity: 1; }
.reel .rx-main.is-on.amen { color: #f3d48a; }
.reel .rx-main.is-on.pray { color: #b9dff0; }
.reel .rx-main.is-on.love { color: #ffb4ab; }
.reel .rx-main.is-on.encourage { color: #b7ebc9; }
.reel-count {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 1rem;
  text-align: center;
}
.rx-reel {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rx-reel .rx-hold {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rx-reel .rx-tray {
  left: auto;
  right: calc(100% + 6px);
  bottom: 0;
  padding: 0;
}
.reel-rx-stack,
.reel-rx-n { display: none !important; }
.reel-meta {
  position: absolute;
  left: 14px;
  right: 78px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  gap: 0.7rem;
  align-items: flex-end;
  color: #fff;
  pointer-events: auto;
}
.reel-author {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
  text-decoration: none;
}
.reel-meta .avatar.reel-avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-size: 0.95rem;
  overflow: hidden;
}
.reel-meta .avatar.reel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.reel-meta-copy { min-width: 0; flex: 1; }
.reel-meta .name {
  color: #fff;
  font-weight: 700;
  display: inline-block;
}
.reel-caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.2rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.reel-caption.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  white-space: pre-wrap;
}
.reel-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  max-height: 72vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 0.35rem 1rem 1rem;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
}
.reel-sheet[hidden] { display: none !important; }
.reel-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0 0.6rem;
}
.reel-comments-head button {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-soft);
}
@media (max-width: 800px) {
  .reel-stage {
    height: calc(100dvh - var(--nav-h) - var(--tabbar-h) - env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 800px) {
  .reel video { width: min(100%, 440px); }
  .reel-side { right: calc(50% - 292px); }
  .reel-meta { left: calc(50% - 196px); width: 280px; right: auto; }
  .reel-sheet {
    top: var(--nav-h);
    right: 0;
    bottom: 0;
    left: auto;
    width: min(400px, 92vw);
    max-height: none;
    border-radius: 0;
  }
}
@media (max-width: 800px) {
  .viewer[hidden],
  .viewer.is-closed {
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }
  .viewer {
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
  }
  .viewer-photo {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    width: 100%;
  }
  .viewer:not(.is-image-only):not(.is-fullscreen) .viewer-photo {
    flex: 1 1 55%;
    min-height: 42dvh;
    max-height: none;
  }
  .viewer-side {
    width: 100%;
    flex: 0 1 38%;
    min-height: 0;
    max-height: 42dvh;
  }
  .viewer.is-image-only .viewer-side,
  .viewer.is-fullscreen .viewer-side { display: none; }
  .viewer.is-image-only .viewer-photo,
  .viewer.is-fullscreen .viewer-photo {
    flex: 1 1 auto;
    max-height: none;
    height: 100%;
  }
  .viewer-top-right { gap: 0.3rem; }
  .viewer-tool { width: 38px; height: 38px; }
}

body.search-open { overflow: hidden; }
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: start center;
  padding: calc(var(--nav-h) + 0.75rem) 1rem 1.5rem;
}
.search-modal[hidden] { display: none !important; }
.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 16, 0.48);
}
.search-modal-sheet {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem 1rem;
}
.search-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}
.search-modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}
.search-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.search-modal-find {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.search-modal-find a { font-weight: 700; }
.nav-search {
  position: relative;
  width: 100%;
  min-width: 0;
}
.nav-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.nav-search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 0.9rem 0 2.2rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.nav-search input:focus {
  outline: 2px solid rgba(26, 92, 64, 0.25);
  border-color: var(--brand);
}
.nav-search-results {
  position: relative;
  margin-top: 0.55rem;
  width: 100%;
  max-height: min(55vh, 420px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.35rem;
}
.nav-search-results[hidden] { display: none !important; }
.nav-search-group + .nav-search-group {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}
.nav-search-group-label {
  margin: 0;
  padding: 0.35rem 0.55rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-search-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  color: inherit;
}
.nav-search-item:hover,
.nav-search-item:focus {
  background: var(--brand-soft);
  outline: none;
}
.nav-search-item .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nav-search-item .who strong {
  font-size: 0.92rem;
  color: var(--ink);
}
.nav-search-item .who span {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-search-cover {
  flex: 0 0 auto;
  width: 40px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.nav-search-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-search-cover.is-empty { background: var(--brand-soft); color: var(--brand-deep); }
.nav-search-empty {
  margin: 0;
  padding: 0.7rem 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.search-list { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.6rem; }
.field-count {
  margin: 0.35rem 0 0;
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
}
.post-edit.is-over {
  outline: 2px dashed var(--brand);
  outline-offset: 4px;
  border-radius: 12px;
}
.composer-group-audience {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
/* display:inline-block above would otherwise beat the HTML hidden attribute */
.composer-group-audience[hidden] {
  display: none !important;
}
.group-page,
.group-index { padding: 1.25rem 0 3rem; }
.group-index-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.group-index-head h1 { margin: 0.15rem 0 0.35rem; }
.group-section-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.05rem;
}
.group-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.group-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.group-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(12, 40, 24, 0.08);
}
.group-card-banner {
  height: 96px;
  background:
    linear-gradient(135deg, rgba(34, 110, 72, 0.55), rgba(20, 70, 48, 0.35)),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.25), transparent 45%),
    #1f6b45;
  overflow: hidden;
}
.group-card-banner.has-photo { background: #10261c; }
.group-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.group-card-body { padding: 0.85rem 0.95rem 1rem; }
.group-card-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.group-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  min-height: 2.5em;
}
.group-card-meta {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.group-hero { overflow: hidden; padding: 0; }
.group-hero-banner {
  position: relative;
  height: 140px;
  background:
    linear-gradient(120deg, rgba(28, 92, 58, 0.7), rgba(14, 48, 32, 0.45)),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2), transparent 40%),
    #1a5c3c;
  overflow: hidden;
}
.group-hero-banner.has-photo { background: #10261c; }
.group-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.group-hero-banner .cover-edit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
}
.group-hero-body {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 1rem 1.15rem 1.1rem;
}
.group-hero-text h1 { margin: 0.15rem 0 0.35rem; }
.group-desc {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42rem;
}
.group-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.group-hero .group-admin {
  padding: 0 1.15rem 1.1rem;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.group-member-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.group-member-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.group-member-chip .avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}
.group-member-chip .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.group-member-name {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-member-chip em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}
.group-pending { margin-top: 1rem; }
.group-pending h2 { margin: 0 0 0.65rem; font-size: 1.05rem; }
.group-pending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.group-pending-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.group-pending-list .group-member-chip { flex: 1; min-width: 140px; }
.group-feed .empty { padding: 1.25rem; }
.group-admin { margin-top: 0.85rem; }
.group-admin summary {
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
  color: var(--brand-deep);
}
.group-edit { margin-top: 0.85rem; }
.devotion-page,
.verse-page { padding-block: 1.6rem 3rem; }
.devotion-date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.devotion-date-nav-center {
  text-align: center;
  min-width: 0;
}
.devotion-card .devotion-kicker { margin-bottom: 0; }
.devotion-today-link {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.devotion-date-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}
a.devotion-date-nav-btn:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}
.devotion-date-nav-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.devotion-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 1.95rem);
  margin-bottom: 0.65rem;
  text-align: center;
}
.devotion-section {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.devotion-section:first-of-type,
.devotion-section-verse {
  border-top: 0;
  padding-top: 0.35rem;
  margin-top: 0.85rem;
}
.devotion-section-title {
  margin: 0 0 0.45rem;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.devotion-card .verse-block {
  margin: 0 0 0.35rem;
  font-family: var(--font-verse);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--brand-deep);
  font-style: italic;
}
.devotion-memorize {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}
.devotion-body {
  margin: 0;
  color: var(--ink);
  white-space: pre-wrap;
  font-size: 1.02rem;
  line-height: 1.65;
}
.devotion-body-key {
  font-family: var(--font-verse);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--brand-deep);
}
.devotion-section-prayer {
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, #f7f3ea 0%, #faf7f0 100%);
  border-radius: 14px;
  border: 1px solid rgba(196, 146, 42, 0.22);
}
.devotion-body-prayer {
  font-family: var(--font-verse);
  font-style: italic;
}
.devotion-card .rx { margin-top: 1.15rem; }
.devotion-recent { margin-top: 1.25rem; }
.devotion-recent h2 { font-size: 1.05rem; }
.devotion-recent ul {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}
.devotion-recent li { margin: 0.25rem 0; }
.devotion-recent a.is-current { font-weight: 700; color: var(--ink); }

/* Private devotion journal — paper + fonts (SpiritCMS-inspired) */
.devotion-journal {
  margin-top: 1.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  --journal-line: 2rem;
}
.devotion-journal-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}
.devotion-journal-head p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.devotion-journal-stylebar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.devotion-journal-style-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
}
.devotion-journal-style-label {
  min-width: 3.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.devotion-journal-style-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.devotion-journal-style-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.devotion-journal-style-btn:hover { border-color: var(--brand); color: var(--brand-deep); }
.devotion-journal-style-btn.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}
.devotion-journal-sheet {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(13, 58, 40, 0.06);
}
.devotion-journal-sheet:focus-within {
  outline: 2px solid rgba(26, 92, 64, 0.35);
  outline-offset: 2px;
}
.devotion-journal-input {
  display: block;
  width: 100%;
  min-height: 260px;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: #1f2937;
  resize: vertical;
  background-color: #fffef8;
  background-attachment: local;
  background-repeat: repeat;
  line-height: var(--journal-line);
  padding: 10px 18px 10px 58px;
  box-sizing: border-box;
  font: inherit;
}
.devotion-journal-input:focus { outline: none; }

.devotion-journal[data-paper="notebook"] .devotion-journal-input {
  background-color: #fffef8;
  background-image:
    linear-gradient(90deg, transparent 52px, rgba(232, 120, 120, 0.55) 52px, rgba(232, 120, 120, 0.55) 54px, transparent 54px),
    repeating-linear-gradient(
      transparent,
      transparent calc(var(--journal-line) - 1px),
      rgba(148, 163, 184, 0.45) calc(var(--journal-line) - 1px),
      rgba(148, 163, 184, 0.45) var(--journal-line)
    );
  background-size: 100% var(--journal-line), 100% var(--journal-line);
}
.devotion-journal[data-paper="vintage"] .devotion-journal-input {
  background-color: #f3e9d2;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.45), transparent 42%),
    radial-gradient(circle at 85% 88%, rgba(139, 107, 63, 0.08), transparent 40%),
    linear-gradient(90deg, transparent 52px, rgba(166, 99, 74, 0.35) 52px, rgba(166, 99, 74, 0.35) 54px, transparent 54px),
    repeating-linear-gradient(
      transparent,
      transparent calc(var(--journal-line) - 1px),
      rgba(166, 124, 82, 0.28) calc(var(--journal-line) - 1px),
      rgba(166, 124, 82, 0.28) var(--journal-line)
    );
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% var(--journal-line);
  color: #3f2f1f;
}
.devotion-journal[data-paper="legal"] .devotion-journal-input {
  background-color: #fef9c3;
  background-image:
    linear-gradient(90deg, transparent 52px, rgba(239, 68, 68, 0.35) 52px, rgba(239, 68, 68, 0.35) 54px, transparent 54px),
    repeating-linear-gradient(
      transparent,
      transparent calc(var(--journal-line) - 1px),
      rgba(59, 130, 246, 0.35) calc(var(--journal-line) - 1px),
      rgba(59, 130, 246, 0.35) var(--journal-line)
    );
  background-size: 100% var(--journal-line), 100% var(--journal-line);
  color: #1e3a5f;
}
.devotion-journal[data-paper="plain"] .devotion-journal-input {
  background-color: #ffffff;
  background-image: repeating-linear-gradient(
    transparent,
    transparent calc(var(--journal-line) - 1px),
    rgba(229, 231, 235, 0.9) calc(var(--journal-line) - 1px),
    rgba(229, 231, 235, 0.9) var(--journal-line)
  );
  background-size: 100% var(--journal-line);
  padding-left: 18px;
  color: #111827;
}

.devotion-journal[data-font="hand"] .devotion-journal-input {
  font-family: 'Caveat', 'Segoe Script', cursive;
  font-size: 1.35rem;
  --journal-line: 2.1rem;
}
.devotion-journal[data-font="script"] .devotion-journal-input {
  font-family: 'Patrick Hand', 'Comic Sans MS', cursive;
  font-size: 1.2rem;
  --journal-line: 2rem;
}
.devotion-journal[data-font="serif"] .devotion-journal-input {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  --journal-line: 1.85rem;
}
.devotion-journal[data-font="typewriter"] .devotion-journal-input {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 1rem;
  --journal-line: 1.85rem;
  letter-spacing: 0.02em;
}
.devotion-journal[data-font="classic"] .devotion-journal-input {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.02rem;
  --journal-line: 1.9rem;
}

.devotion-journal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  justify-content: space-between;
  margin-top: 0.85rem;
}
.devotion-journal-meta {
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 1.2em;
}
.devotion-journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}
.devotion-journal-actions .is-busy { opacity: 0.7; pointer-events: none; }

@media (max-width: 560px) {
  .devotion-journal-input { min-height: 220px; }
  .devotion-journal-style-label { min-width: 100%; }
}
.group-admin form + form,
.group-admin details + form { margin-top: 0.75rem; }

body.is-profile-teaser {
  overflow: hidden;
}
.profile-tease {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
  transform: scale(1.015);
  transform-origin: top center;
}
.profile-lock {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  padding: 2.5rem 1rem 2rem;
  overflow: auto;
  background: rgba(255, 250, 244, 0.22);
}
.profile-lock .auth-card {
  margin-top: 1.25rem;
  background: rgba(255,255,255,0.94);
}
.profile-lock-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 0.55rem;
  color: var(--accent);
}
@media (min-width: 801px) {
  :root { --nav-h: 60px; }
  .nav-create-btn,
  .nav-home-btn,
  .nav-reels-btn,
  .nav-search-btn,
  .note-trigger,
  .nav-menu-btn,
  .nav-profile {
    width: 48px;
    height: 48px;
  }
  .nav-create-btn svg,
  .nav-menu-btn svg,
  .nav-home-btn svg,
  .nav-reels-btn svg,
  .nav-search-btn svg,
  .nav-ico,
  .note-bell {
    width: 30px;
    height: 30px;
  }
  .nav-create-btn svg {
    width: 32px;
    height: 32px;
  }
  .nav-profile .avatar {
    width: 36px;
    height: 36px;
    font-size: 0.88rem;
  }
  .nav-label { display: none; }
  .nav-left,
  .nav-actions { gap: 0.35rem; }
}
@media (max-width: 980px) {
  .topnav-inner { gap: 0.25rem; width: min(1120px, calc(100% - 0.85rem)); }
  .topnav .brand { font-size: 1.18rem; }
  .nav-left { gap: 0.1rem; }
  .nav-actions { gap: 0.1rem; }
  .nav-create-btn { margin-right: 0.12rem; }
  .nav-profile { margin-right: 0.28rem; }
}
@media (max-width: 800px) {
  :root { --page-gutter: 0.4rem; }
  .container,
  .container-narrow,
  .flashes,
  .settings-page-layout,
  .hero-inner {
    width: 100%;
    max-width: none;
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px)) !important;
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px)) !important;
    box-sizing: border-box;
  }
  .topnav-inner {
    width: 100%;
    padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }
  .app-grid {
    gap: 0.75rem;
    padding-top: 0.7rem;
  }
  .panel {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 12px;
  }
  .profile-cover { border-radius: 12px 12px 0 0; }
  .profile-headband {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
    border-radius: 0 0 12px 12px;
  }
  .auth-shell { padding-left: max(0.5rem, env(safe-area-inset-left, 0px)); padding-right: max(0.5rem, env(safe-area-inset-right, 0px)); }
  .composer-modal {
    padding: 0.3rem;
    padding-left: max(0.3rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.3rem, env(safe-area-inset-right, 0px));
  }
  .composer-sheet { width: 100%; border-radius: 14px; }
  .account-drawer {
    width: min(360px, 100%);
    padding-left: max(0.75rem, env(safe-area-inset-right, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
  .footer-mini {
    padding-left: max(0.6rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.6rem, env(safe-area-inset-right, 0px));
  }
}
@media (max-width: 480px) {
  .topnav.is-guest .nav-left {
    flex: 0 0 0;
    min-width: 0;
    width: 0;
    overflow: hidden;
  }
  .topnav.is-guest .brand {
    position: static;
    transform: none;
    padding: 0.2rem 0.35rem 0.2rem 0;
  }
  .topnav.is-guest .nav-actions { flex: 1 1 auto; }
}
@media (max-width: 800px) {
  body.has-tabbar:not(:has(.by-shell)) {
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  }
  body.has-tabbar:not(:has(.by-shell)) .topnav {
    transition: transform 0.22s var(--ease);
  }
  body.has-tabbar:not(:has(.by-shell)) .topnav .brand {
    position: static;
    transform: none;
    padding: 0.2rem 0.35rem 0.2rem 0.05rem;
    font-size: 1.32rem;
  }
  body.has-tabbar:not(:has(.by-shell)) .topnav-inner {
    justify-content: flex-start;
  }
  body.has-tabbar:not(:has(.by-shell)) .nav-left {
    order: 3;
    flex: 0 0 auto;
    justify-content: flex-end;
  }
  body.has-tabbar:not(:has(.by-shell)) .nav-actions {
    order: 2;
    flex: 0 0 auto;
    margin-left: auto;
  }
  body.has-tabbar:not(:has(.by-shell)) .nav-home-btn,
  body.has-tabbar:not(:has(.by-shell)) .nav-reels-btn,
  body.has-tabbar:not(:has(.by-shell)) .nav-profile,
  body.has-tabbar:not(:has(.by-shell)) .note-wrap,
  body.has-tabbar:not(:has(.by-shell)) .nav-menu-btn {
    display: none;
  }
  body.has-tabbar:not(:has(.by-shell)) .nav-create-btn,
  body.has-tabbar:not(:has(.by-shell)) .nav-search-btn {
    width: 44px;
    height: 44px;
  }
  body.has-tabbar:not(:has(.by-shell)) .nav-create-btn svg,
  body.has-tabbar:not(:has(.by-shell)) .nav-search-btn svg {
    width: 26px;
    height: 26px;
  }
  body.has-tabbar:not(:has(.by-shell)) .tabbar {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 48;
    min-height: var(--tabbar-h);
    height: auto;
    padding: 0 max(0.15rem, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(0.15rem, env(safe-area-inset-left, 0px));
    background: rgba(247, 250, 248, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.22s var(--ease);
  }
  .tabbar.is-away { transform: translateY(100%); }
  .tabbar-item {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--tabbar-h);
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar-item svg {
    width: 28px;
    height: 28px;
    display: block;
  }
  .tabbar-item.is-active,
  .tabbar-item[aria-expanded="true"] { color: var(--brand-deep); }
  .tabbar-item .note-badge {
    top: 8px;
    right: calc(50% - 18px);
  }
}
body:has(.by-shell) .tabbar { display: none !important; }
.profile-follows a {
  color: inherit;
  text-decoration: none;
}
.profile-follows a:hover strong { color: var(--brand-deep); }
.profile-follow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.65rem 0 0;
}
.profile-follow-tabs a {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
  padding: 0.2rem 0;
}
.profile-follow-tabs a.is-active {
  color: var(--brand-deep);
  text-decoration: underline;
}

/* Circles + Level Up */
.side-level-up,
.account-level-up,
.level-up-link {
  font-weight: 700;
  color: var(--accent) !important;
  letter-spacing: -0.01em;
}
.side-level-up.is-active {
  background: var(--accent-soft) !important;
  color: #7a5a12 !important;
}
.level-up-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s ease;
}
.level-up-link:hover {
  transform: translateY(-1px);
  background: #f0d9a0;
  color: #6a4e10 !important;
}
.level-up-link.sm {
  padding: 0.28rem 0.6rem;
  font-size: 0.85rem;
}
.circle-index,
.circle-page { padding: 1.25rem 0 3rem; }
.circle-create { padding: 2rem 0 3rem; }
.circle-index-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.circle-index-head > div:first-child {
  flex: 1 1 16rem;
  min-width: 0;
}
.circle-find .circle-index-head { align-items: flex-start; }
.circle-find .app-grid {
  grid-template-columns: 240px minmax(0, 1fr);
}
.circle-find-hero {
  margin-bottom: 1.1rem;
}
.circle-find-hero h1 {
  margin: 0.1rem 0 0.35rem;
  font-size: clamp(1.85rem, 3.4vw, 2.35rem);
}
.circle-find-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.circle-index-head h1 { margin: 0.15rem 0 0.35rem; }
.circle-index-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.circle-progress-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6a4e10;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  animation: level-up-pulse 2.4s var(--ease) infinite;
}
.circle-progress-chip strong {
  font-family: var(--font-display);
  font-size: 1rem;
}
@keyframes level-up-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 146, 42, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(196, 146, 42, 0); }
}
.circle-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.35rem 0 0.75rem;
  font-size: 1.05rem;
}
.circle-section-more {
  font-family: var(--font-body, inherit);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.circle-section-more:hover { text-decoration: underline; }
.circle-find-intro {
  max-width: 42rem;
  margin: 0;
  color: var(--ink-soft);
}
.circle-find-tools {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.15rem;
  padding: 1rem 1.1rem 1.05rem;
}
.circle-find-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.circle-find-chips::-webkit-scrollbar { display: none; }
.circle-find-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.circle-find-chip:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.circle-find-chip.is-active {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}
.circle-find-search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.circle-find-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 0.95rem;
  font: inherit;
  background: var(--surface);
}
.circle-find-search input[type="search"]:focus {
  outline: 2px solid rgba(26, 92, 64, 0.25);
  border-color: var(--brand);
}
.circle-find-count {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.circle-find-banner {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
}
.circle-find.is-guest-find .app-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
  margin: 0 auto;
}
.circle-find .circle-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.circle-find .circle-card-banner { height: 112px; }
.circle-find .circle-card.is-mine {
  box-shadow: inset 0 0 0 1px rgba(26, 92, 64, 0.16);
}
@media (max-width: 980px) {
  .circle-find .app-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .circle-find .circle-card-grid { grid-template-columns: minmax(0, 1fr); }
  .circle-find-hero-row,
  .circle-find-search { flex-wrap: wrap; }
  .circle-find-hero-row .circle-index-actions,
  .circle-find-hero-row .btn,
  .circle-find-search .btn { width: 100%; }
}
.circle-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.circle-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.2s var(--ease);
}
.circle-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(12, 40, 24, 0.08);
  transform: translateY(-2px);
}
.circle-card-banner {
  height: 68px;
  background:
    linear-gradient(135deg, rgba(196, 146, 42, 0.55), rgba(26, 92, 64, 0.55)),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.22), transparent 50%),
    #1a5c40;
  overflow: hidden;
}
.circle-card-banner.is-public {
  background:
    linear-gradient(135deg, rgba(26, 92, 64, 0.7), rgba(45, 106, 138, 0.45)),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.18), transparent 45%),
    #145238;
}
.circle-card-banner.has-photo { background: #10261c; }
.circle-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.circle-card-body { padding: 0.85rem 0.95rem 1rem; }
.circle-card-purpose {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.circle-card-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.circle-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  min-height: 2.4em;
}
.circle-card-meta {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.circle-empty { padding: 1.1rem; }
.circle-invites { margin-bottom: 0.5rem; }
.circle-invites h2 { margin: 0 0 0.65rem; font-size: 1.05rem; }
.circle-invite-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.circle-invite-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.circle-invite-list li span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}
.circle-hero { overflow: hidden; padding: 0; }
.circle-hero-banner {
  position: relative;
  height: 140px;
  background:
    linear-gradient(120deg, rgba(196, 146, 42, 0.55), rgba(13, 58, 40, 0.65)),
    radial-gradient(circle at 85% 25%, rgba(255,255,255,0.22), transparent 42%),
    #164f38;
  overflow: hidden;
}
.circle-hero-banner.has-photo {
  background: #10261c;
}
.circle-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.circle-hero-banner .cover-edit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
}
.circle-hero-body {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 1rem 1.15rem 1.1rem;
}
.circle-hero-identity,
.org-hero-identity {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}
.circle-avatar-wrap,
.org-logo-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-top: -2.4rem;
}
.circle-avatar-wrap .avatar.xl,
.org-logo-wrap .avatar.xl {
  border: 3px solid var(--paper);
  box-shadow: 0 6px 18px rgba(12, 40, 24, 0.12);
}
.org-logo-wrap .avatar-plus {
  right: 2px;
  bottom: 2px;
}
.circle-hero-text h1 { margin: 0.15rem 0 0.35rem; }
.circle-pending { margin-top: 1rem; }
.circle-pending h2 { margin: 0 0 0.65rem; font-size: 1.05rem; }
.circle-deny-form {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}
.circle-deny-form input[type="text"] {
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  font: inherit;
  font-size: 0.85rem;
}
.circle-desc {
  margin: 0 0 0.35rem;
  color: var(--ink-soft);
  max-width: 42rem;
}
.circle-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.circle-gear {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.2s var(--ease);
}
.circle-gear svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}
.circle-gear:hover,
.circle-gear.is-on {
  color: var(--brand-deep);
  border-color: var(--brand);
  background: var(--brand-soft);
}
.circle-gear.is-on {
  transform: rotate(30deg);
}
.circle-hero .circle-admin {
  padding: 0.95rem 1.15rem 1.15rem;
  border-top: 1px solid var(--line);
  animation: level-up-in 0.35s var(--ease) both;
}
.circle-admin-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}
.circle-edit { margin-top: 0.15rem; }
.circle-invite-banner,
.circle-votes { margin-top: 1rem; }
.circle-votes h2,
.circle-invite-banner h2 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.circle-vote-row {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.circle-vote-row:last-child { border-bottom: 0; }
.circle-vote-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.35rem;
}
.circle-feed {
  margin-top: 1rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.circle-feed .empty { padding: 1.25rem; }
.circle-member-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.circle-member-row:last-child { border-bottom: 0; }
.circle-member-tools {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding-left: 2.6rem;
}
.circle-rail .panel { overflow: visible; }
.circle-invite-box { margin-top: 0.9rem; }
.circle-invite-search-wrap { position: relative; z-index: 21; }
.circle-invite-box input[type="search"],
.circle-invite-form input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font: inherit;
}
.circle-invite-form {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.circle-invite-form input[type="email"] {
  flex: 1;
  min-width: 140px;
  width: auto;
}
.circle-invite-suggest {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  left: auto;
  width: 100%;
  min-width: 100%;
  z-index: 30;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow: auto;
  padding: 0.3rem;
}
.circle-invite-suggest[hidden] { display: none !important; }
.circle-invite-suggest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.32rem 0.4rem 0.32rem 0.35rem;
  border-radius: 10px;
}
.circle-invite-suggest-row + .circle-invite-suggest-row {
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.circle-invite-suggest-row:hover { background: var(--surface-2); }
.circle-invite-suggest-who {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.circle-invite-suggest-who .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 28px;
  font-size: 0.7rem;
}
.circle-invite-suggest-who .avatar img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}
.circle-invite-suggest-meta {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
}
.circle-invite-suggest-meta strong {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.circle-invite-suggest-meta em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}
.circle-invite-suggest-meta em::before {
  content: "·";
  margin-right: 0.35rem;
}
.circle-invite-suggest-row .btn {
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
}
@media (min-width: 801px) {
  .circle-invite-suggest {
    width: min(26rem, calc(100vw - 2rem));
  }
}
.circle-invite-empty {
  margin: 0;
  padding: 0.65rem 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.circle-pending-invites h3 { margin: 0 0 0.35rem; }
.circle-invite-row {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: flex-start;
  min-width: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.circle-invite-row:last-child { border-bottom: 0; }
.circle-invite-meta {
  min-width: 0;
  flex: 1;
}
.circle-invite-meta strong {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}
.circle-invite-row .field-hint { margin: 0.15rem 0 0; }
.circle-invite-tools {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}
.circle-invite-x {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.05rem;
  border: 0;
  border-radius: 999px;
  background: #eef3f0;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.circle-invite-x:hover {
  background: #fde8e6;
  color: var(--danger);
}
.circle-revoke-modal[hidden] { display: none !important; }
.circle-revoke-modal {
  position: fixed;
  inset: 0;
  z-index: 94;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.circle-revoke-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 18, 0.45);
}
.circle-revoke-sheet {
  position: relative;
  width: min(400px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 18px 50px rgba(10, 24, 16, 0.28);
}
.circle-revoke-sheet h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}
.circle-revoke-sheet p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}
.circle-revoke-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
.circle-name-status {
  margin: 0.35rem 0 0;
  font-weight: 600;
  min-height: 1.2em;
}
.circle-name-status.is-good { color: var(--brand-deep); }
.circle-name-status.is-bad { color: #b42318; }
.circle-create .btn-primary:disabled,
.circle-edit .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.level-up-page { padding: 2rem 0 3.5rem; }
.level-up-hero {
  margin-bottom: 1.5rem;
  animation: level-up-in 0.55s var(--ease) both;
}
.level-up-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: 0.45rem;
}
.level-up-hero > p {
  font-size: 1.05rem;
  max-width: 34rem;
}
.level-up-meter {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 1.1rem;
}
.level-up-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.6s var(--ease);
}
.level-up-meter-label {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.level-up-steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.level-up-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  animation: level-up-in 0.5s var(--ease) both;
}
.level-up-step:nth-child(2) { animation-delay: 0.05s; }
.level-up-step:nth-child(3) { animation-delay: 0.1s; }
.level-up-step:nth-child(4) { animation-delay: 0.15s; }
.level-up-step:nth-child(5) { animation-delay: 0.2s; }
.level-up-step.is-done {
  border-color: rgba(26, 122, 76, 0.35);
  background: linear-gradient(180deg, #f4fbf7, var(--paper));
}
.level-up-step p { margin: 0.2rem 0 0; font-size: 0.92rem; }
.level-up-check {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--surface-2);
  color: var(--ink-soft);
}
.level-up-step.is-done .level-up-check {
  background: var(--brand);
  color: #fff;
}
.level-up-cta h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.level-up-cta-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.level-up-discover { margin-top: 1.75rem; }
.level-up-discover h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}
@keyframes level-up-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ci-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 1rem 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--accent-soft);
}
.ci-banner p { margin: 0; font-weight: 600; }
.ci-banner-actions { display: flex; gap: 0.4rem; }
.ci-modal[hidden] { display: none !important; }
.ci-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.ci-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 16, 0.48);
}
.ci-sheet {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.1rem;
}
.ci-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.ci-head h2 { margin: 0; font-size: 1.2rem; }
.ci-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.ci-status {
  min-height: 1.2em;
  margin: 0.45rem 0 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.ci-status.is-good { color: var(--brand); }
.ci-status.is-warn { color: #9a4a1a; }
.ci-search {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.95rem;
  font: inherit;
}
.ci-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.65rem 0 0.4rem;
}
.ci-picked { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.ci-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 42vh;
  overflow: auto;
}
.ci-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.35rem;
  border-radius: 10px;
  cursor: pointer;
}
.ci-row:hover { background: var(--brand-soft); }
.ci-row.is-locked { opacity: 0.7; cursor: default; }
.ci-row input { margin: 0; }
.ci-who { display: flex; flex-direction: column; min-width: 0; }
.ci-who strong { font-size: 0.95rem; }
.ci-who em { font-size: 0.75rem; color: var(--muted); font-style: normal; }
.ci-empty { margin: 0.75rem 0; color: var(--muted); }
.ci-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
@media (max-width: 720px) {
  .circle-index-actions { width: 100%; }
  .circle-member-tools { padding-left: 0; }
}

/* Stories */
.story-rail {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.85rem;
  margin: 0 0 0.85rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.story-rail::-webkit-scrollbar { display: none; }
.story-tile {
  flex: 0 0 76px;
  width: 76px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}
.story-ring {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  background: var(--line-strong);
  position: relative;
}
.story-tile.is-unseen .story-ring {
  background: linear-gradient(135deg, var(--accent) 0%, #e0b24a 38%, var(--brand) 100%);
}
.story-ring .avatar {
  width: 60px;
  height: 60px;
  font-size: 1.15rem;
  border: 3px solid var(--paper);
}
.story-tile.is-you:not([data-story-open]) .story-ring::after {
  content: '+';
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 20px;
  border: 2px solid var(--paper);
}
.story-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-photo.has-story {
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px var(--accent),
    0 10px 28px rgba(13, 58, 40, 0.16);
}
.avatar-menu {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  z-index: 9;
  min-width: 168px;
  padding: 0.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.avatar-menu[hidden] { display: none !important; }
.avatar-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;
}
.avatar-menu button:hover { background: var(--brand-soft); color: var(--brand-deep); }

html.story-open,
body.story-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}
body.story-open .tabbar { display: none !important; }
.story-stage {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: grid;
  place-items: center;
  padding: 0.75rem;
  box-sizing: border-box;
  background: rgba(4, 7, 6, 0.98);
  color: #fff;
  touch-action: none;
  overscroll-behavior: none;
}
.story-stage[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.story-card {
  position: relative;
  box-sizing: border-box;
  /* Always fit in the viewport: width is limited by both max phone width
     and available height at 9:16, so the card never overflows the window. */
  --story-pad: 1.5rem;
  --story-max-h: calc(100dvh - var(--story-pad));
  --story-max-w: min(444px, calc(100vw - var(--story-pad)));
  width: min(var(--story-max-w), calc(var(--story-max-h) * 9 / 16));
  height: auto;
  max-height: var(--story-max-h);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #070b09;
  border-radius: 16px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.55);
}
.story-card::before,
.story-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}
.story-card::before {
  top: 0;
  height: 7rem;
  background: linear-gradient(to bottom, rgba(3, 7, 6, 0.56), transparent);
}
.story-card::after {
  bottom: 0;
  height: 9rem;
  background: linear-gradient(to top, rgba(3, 7, 6, 0.58), transparent);
}
.story-backdrop {
  position: absolute;
  inset: -2rem;
  z-index: 0;
  overflow: hidden;
  background-color: #16211b;
  background-size: cover;
  background-position: center;
  filter: saturate(1.25) brightness(0.85);
}
.story-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 4, 0.1);
}
.story-backdrop img,
.story-backdrop video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-backdrop img {
  filter: blur(36px) saturate(1.28) brightness(0.9) contrast(0.78);
  transform: scale(1.18);
}
.story-backdrop video {
  filter: blur(56px) saturate(0.88) brightness(0.5);
  transform: scale(1.35);
}
.story-backdrop [hidden] {
  display: none !important;
}
.story-progress {
  position: absolute;
  top: max(0.55rem, env(safe-area-inset-top, 0px));
  left: 0.65rem;
  right: 0.65rem;
  z-index: 7;
  display: flex;
  gap: 0.22rem;
}
.story-tick {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.story-tick i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}
.story-tick.is-done i { width: 100%; }
.story-tick.is-paused i { opacity: 0.85; }
.story-bar {
  position: absolute;
  top: max(1.05rem, calc(env(safe-area-inset-top, 0px) + 0.55rem));
  left: 0.7rem;
  right: 0.7rem;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.story-who {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}
.story-who:hover { color: #fff; }
.story-who-meta {
  min-width: 0;
  overflow: hidden;
}
.story-who .avatar {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
  flex: 0 0 auto;
}
.story-who strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-who em,
.story-who time {
  display: block;
  font-size: 0.74rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.72);
}
.story-bar-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.story-sound {
  height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.story-sound[hidden],
.story-sound [hidden] { display: none !important; }
.story-x {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.story-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}
.story-frame img,
.story-frame video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}
.story-frame [hidden] {
  display: none !important;
}
.story-text {
  width: min(calc(100% - 3rem), 19rem);
  max-height: calc(100% - 10rem);
  box-sizing: border-box;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.35rem 1.15rem;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(26, 92, 64, 0.96), rgba(12, 36, 26, 0.94) 58%, rgba(196, 146, 42, 0.55));
  font-family: var(--font-verse);
  font-size: clamp(1.1rem, 4.2vw, 1.55rem);
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
  overflow-y: auto;
}
.story-bottom {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: max(0.8rem, env(safe-area-inset-bottom, 0px));
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  pointer-events: none;
}
.story-caption {
  display: block;
  max-width: 100%;
  max-height: min(8rem, 28dvh);
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
  overflow-y: auto;
}
.story-caption[hidden] { display: none !important; }
.story-post-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(8, 15, 11, 0.72);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.story-post-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.story-hit {
  position: absolute;
  top: 4.1rem;
  bottom: 4.7rem;
  z-index: 3;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.story-hit.is-prev { left: 0; width: 32%; }
.story-hit.is-next { right: 0; width: 68%; }
@media (max-width: 800px) {
  .story-rail {
    margin-left: -0.35rem;
    margin-right: -0.35rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  .story-tile { flex-basis: 70px; width: 70px; }
  .story-ring { width: 62px; height: 62px; }
  .story-ring .avatar { width: 54px; height: 54px; }
}
@media (max-width: 600px) {
  .story-stage { padding: 0; }
  .story-card {
    --story-pad: 0px;
    --story-max-h: 100dvh;
    --story-max-w: 100vw;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    aspect-ratio: auto;
  }
}

/* Circle meetings */
.circle-meetings { margin: 1rem 0; }
.circle-meeting-head,
.circle-meeting-card-top,
.circle-rsvp-actions,
.circle-meeting-form-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.circle-meeting-head,
.circle-meeting-card-top { justify-content: space-between; }
.circle-meeting-head h2,
.circle-meeting-card h3 {
  margin: 0.15rem 0 0.3rem;
}
.circle-meeting-card h3 { font-family: var(--font); }
.circle-meeting-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.circle-title-amp {
  display: inline-block;
  margin: 0 0.08em;
  color: var(--brand);
  font-family: var(--font);
  font-size: 0.68em;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-0.08em);
}
.circle-meeting-head p,
.circle-meeting-card p { margin-top: 0; }
.circle-gather-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.circle-gather-action {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.circle-gather-action:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 99, 63, 0.42);
  background: #f7fbf8;
  color: var(--ink);
}
.circle-gather-action.is-live {
  border-color: rgba(23, 99, 63, 0.3);
  background: linear-gradient(135deg, #f4fbf7, #edf7f1);
}
.circle-gather-action-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.circle-gather-action-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}
.circle-gather-action-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}
.circle-gather-action strong { font-size: 0.94rem; }
.circle-gather-action-copy small {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}
.circle-gather-action-copy i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #99a29d;
}
.circle-gather-action.has-people .circle-gather-action-copy small { color: var(--success); }
.circle-gather-action.has-people .circle-gather-action-copy i {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(26, 122, 76, 0.12);
}
.circle-gather-action-arrow {
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 800;
}
.circle-meeting-form {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.circle-meeting-form[hidden] { display: none !important; }
.circle-meeting-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, 0.5fr);
  gap: 0.75rem;
}
.circle-meeting-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}
.circle-meeting-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.circle-meeting-time { color: var(--brand-deep); font-weight: 700; }
.circle-meeting-agenda { white-space: pre-wrap; color: var(--ink-soft); }
.circle-rsvp-actions { flex-wrap: wrap; margin: 0.85rem 0; }
.circle-rsvp-actions form { margin: 0; }
.circle-rsvp-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.circle-rsvp-person {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.circle-rsvp-person:hover { background: var(--surface-2); }
.circle-rsvp-person .avatar { width: 32px; height: 32px; font-size: 0.75rem; }
.circle-rsvp-state {
  grid-column: 2;
  margin-top: -0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}
.circle-rsvp-state.accepted { color: var(--success); font-weight: 700; }
.circle-rsvp-state.declined { color: var(--muted); }
.circle-meeting-manage { margin-top: 0.75rem; }
.circle-meeting-manage summary {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.circle-meeting-manage form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

/* Always-open Circle room */
body.circle-room-page {
  height: 100dvh;
  padding-bottom: 0 !important;
  overflow: hidden;
  background: #07100b;
}
html:has(body.circle-room-page) { overflow: hidden; }
body.circle-room-page .site-nav,
body.circle-room-page .tabbar { display: none !important; }
.circle-room-shell {
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(31, 108, 75, 0.28), transparent 36%),
    #07100b;
}
.circle-room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.circle-room-header h1 {
  margin: 0.1rem 0;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.circle-room-header p { margin: 0; color: rgba(255,255,255,0.65); }
.circle-room-header a { color: #b9dfca; text-decoration: none; }
.circle-room-status {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  font-size: 0.78rem;
  font-weight: 700;
}
.circle-room-preview,
.circle-room-unavailable {
  place-self: center;
  width: min(520px, calc(100% - 2rem));
  text-align: center;
  padding: 2rem;
}
.circle-room-preview-copy h2 { margin-top: 0; }
.circle-room-preview-copy p { color: rgba(255,255,255,0.72); }
.circle-room-preview [data-room-join] {
  min-width: 150px;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  font-size: 0.95rem;
}
.circle-room-main {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: clamp(0.4rem, 1.2vw, 0.85rem);
}
.circle-room-main[hidden],
.circle-room-controls[hidden] { display: none !important; }
.circle-room-grid {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(0.35rem, 0.8vw, 0.65rem);
}
.circle-room-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.circle-room-grid[data-count="3"],
.circle-room-grid[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.circle-room-grid[data-count="5"],
.circle-room-grid[data-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.circle-room-grid[data-count="7"],
.circle-room-grid[data-count="8"],
.circle-room-grid[data-count="9"],
.circle-room-grid[data-count="10"],
.circle-room-grid[data-count="11"],
.circle-room-grid[data-count="12"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.circle-room-person {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: #101914;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  scroll-snap-align: start;
}
.circle-room-person.is-speaking {
  border-color: rgba(114, 226, 169, 0.95);
  box-shadow: 0 0 0 2px rgba(114, 226, 169, 0.28);
}
.circle-room-grid[data-pinned="1"] {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.circle-room-grid[data-pinned="1"] .circle-room-person {
  flex: 0 0 min(180px, 38vw);
}
.circle-room-grid[data-pinned="1"] .circle-room-person.is-pinned {
  flex-basis: min(78vw, 980px);
  order: -1;
}
.circle-room-grid[data-pinned="1"][data-count] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 112px;
  overflow: hidden;
}
.circle-room-filmstrip {
  display: flex;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
}
.circle-room-filmstrip .circle-room-person {
  flex: 0 0 min(160px, 36vw);
  height: 100%;
}
.circle-room-person:fullscreen {
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
  background: #000;
}
.circle-room-person:fullscreen video { object-fit: contain; }
.circle-room-media,
.circle-room-media video {
  width: 100%;
  height: 100%;
}
.circle-room-media {
  position: absolute;
  inset: 0;
}
.circle-room-media video {
  display: block;
  object-fit: contain;
  background: #050806;
}
.circle-room-person-meta {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(3,8,5,0.72);
  backdrop-filter: blur(8px);
}
.circle-room-person-actions { display: flex; gap: 0.3rem; }
.circle-room-person-actions button {
  border: 0;
  border-radius: 7px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}
.circle-room-empty {
  place-self: center;
  color: rgba(255,255,255,0.62);
}
.circle-room-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(3,8,5,0.94);
}
.circle-room-controls button {
  min-width: 128px;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.circle-room-controls .is-leave { background: #a53232; }
@media (max-width: 640px) {
  .circle-meeting-head,
  .circle-meeting-card-top { align-items: flex-start; flex-direction: column; }
  .circle-gather-actions { grid-template-columns: 1fr; gap: 0.6rem; }
  .circle-meeting-fields { grid-template-columns: 1fr; }
  .circle-room-header { padding: 0.65rem 0.8rem; }
  .circle-room-header p { display: none; }
  .circle-room-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.65rem;
  }
  .circle-room-controls button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }
  .circle-room-grid[data-count="2"] {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .circle-room-grid[data-count="3"],
  .circle-room-grid[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .circle-room-grid[data-count="5"],
  .circle-room-grid[data-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
  .circle-room-grid[data-count="7"],
  .circle-room-grid[data-count="8"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }
  .circle-room-grid[data-count="9"],
  .circle-room-grid[data-count="10"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }
  .circle-room-grid[data-count="11"],
  .circle-room-grid[data-count="12"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
  }
}

/* Public circle splash (unsigned visitors) */
.circle-splash-hero {
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f4faf6;
}
.circle-splash-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.circle-splash-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.circle-splash-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 28, 18, 0.42) 0%, rgba(8, 28, 18, 0.38) 28%, rgba(8, 28, 18, 0.72) 58%, rgba(8, 28, 18, 0.88) 78%, rgba(8, 28, 18, 0.96) 100%),
    linear-gradient(90deg, rgba(8, 28, 18, 0.62) 0%, rgba(8, 28, 18, 0.28) 58%, rgba(8, 28, 18, 0.45) 100%);
  pointer-events: none;
}
.circle-splash-inner {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.2rem 0 2.8rem;
}
.circle-splash-kicker {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0c14b;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.45);
}
.circle-splash-hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  color: #fff;
  margin: 0 0 0.7rem;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 8px 20px rgba(0, 0, 0, 0.55),
    0 18px 48px rgba(0, 0, 0, 0.45);
  animation: riseIn 0.85s var(--ease) both;
}
.circle-splash-hook {
  font-family: var(--font-verse);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.35;
  color: #f4faf6;
  max-width: 34ch;
  margin: 0 0 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65), 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: riseIn 0.85s 0.08s var(--ease) both;
}
.circle-splash-desc {
  max-width: 46ch;
  color: #eef6f1;
  font-size: 1.05rem;
  margin: 0 0 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 8px 22px rgba(0, 0, 0, 0.4);
  animation: riseIn 0.85s 0.14s var(--ease) both;
}
.circle-splash-meta {
  color: rgba(244, 250, 246, 0.86);
  font-size: 0.92rem;
  font-weight: 500;
  margin: 0 0 1.6rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.4);
  animation: riseIn 0.85s 0.18s var(--ease) both;
}
.circle-splash-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: riseIn 0.85s 0.24s var(--ease) both;
}
.circle-splash-why {
  padding: 4.2rem 0 4.8rem;
}
.circle-splash-lead {
  max-width: 58ch;
  font-size: 1.08rem;
  margin-bottom: 0.4rem;
}
.circle-splash-close {
  margin-top: 2.4rem;
  padding: 1.7rem 1.6rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.circle-splash-close h3 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  margin-bottom: 0.4rem;
}
.circle-splash-close p { max-width: 50ch; }
@media (max-width: 640px) {
  .circle-splash-hero { min-height: 0; }
  .circle-splash-inner { padding: 3.4rem 0 2.2rem; }
  .circle-splash-hero h1 { font-size: clamp(2.1rem, 11vw, 3rem); }
  .circle-splash-cta .btn { width: 100%; text-align: center; }
}

/* Audience-scoped reactions and owner insights. */
.engagement-dialog{width:min(560px,calc(100vw - 24px));max-height:85vh;overflow:auto;border:1px solid #d9e2de;border-radius:20px;padding:24px;color:#17372d;background:#fff}
.engagement-dialog::backdrop{background:#0007}
.engagement-dialog h2{margin-top:0}
.engagement-dialog dl{display:grid;grid-template-columns:1fr auto;gap:10px 20px}
.engagement-dialog dd{margin:0;font-weight:700}
.engagement-dialog ul{padding:0;list-style:none}
.engagement-dialog li{padding:12px 0;border-bottom:1px solid #e5ece8}
.engagement-tabs{display:flex;gap:6px;overflow:auto;margin:12px 0}
.engagement-tabs button{white-space:nowrap;border:1px solid #d9e2de;border-radius:20px;background:#fff;padding:8px 12px}
.engagement-tabs button[aria-pressed=true]{background:#195c47;color:#fff}
[data-reaction-count-accessible]{cursor:pointer}
[data-reaction-count-accessible]:focus-visible{outline:2px solid #195c47;outline-offset:3px}

/* App recommendations stay in normal flow so they never cover site controls. */
.app-prompt { background: var(--brand-soft); border-bottom: 1px solid var(--line-strong); }
.app-prompt[hidden],
body.reels-page .app-prompt,
body.circle-room-page .app-prompt,
body:has(.by-shell) .app-prompt { display: none; }
.app-prompt-inner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0.6rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem max(0.6rem, env(safe-area-inset-right, 0px)) 0.65rem max(0.6rem, env(safe-area-inset-left, 0px));
}
.app-prompt-icon { grid-column: 1; grid-row: 1; border-radius: 10px; }
.app-prompt-copy { grid-column: 2; grid-row: 1; display: grid; gap: 0.2rem; line-height: 1.4; }
.app-prompt-copy strong { font-size: 0.8rem; }
.app-prompt-copy span { font-size: 0.72rem; color: var(--ink-soft); }
.app-prompt-link {
  display: inline-flex;
  grid-column: 2 / 4;
  grid-row: 2;
  justify-self: start;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  text-decoration: none;
}
.app-prompt-link img { display: block; width: auto; height: 40px; }
.app-prompt-link img.is-google-play { height: 60px; }
.app-prompt-dismiss {
  grid-column: 3;
  grid-row: 1;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.6rem;
  cursor: pointer;
}
.app-prompt-dismiss:hover { background: rgba(20, 36, 28, 0.08); }
.app-store-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.app-store-button {
  display: inline-flex;
  min-height: 66px;
  align-items: center;
  text-decoration: none;
}
.app-store-button img { display: block; width: auto; height: 44px; }
.app-store-button img.google-play-badge { height: 66px; }
.app-prompt-link:focus-visible,
.app-prompt-dismiss:focus-visible,
.app-store-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Keep identities readable in posts, member lists, and reaction dialogs. */
.group-member-name,
.circle-invite-suggest-meta strong,
.story-name,
.story-who strong,
.post-meta .name,
.share-embed-head .name {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  min-width: 0;
}
.share-embed-head { flex-wrap: wrap; }
.circle-settings { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.circle-settings summary { cursor: pointer; font-weight: 600; }
.circle-settings-member { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .75rem 0; }
.engagement-dialog li { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; flex-wrap: wrap; }
.engagement-dialog li a { display: inline-flex; align-items: center; gap: .65rem; overflow-wrap: anywhere; min-width: 0; }
.reactor-avatar { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--paper); overflow: hidden; }
.reactor-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.composer-location { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.composer-location-chip { display: inline-flex; align-items: center; gap: .25rem; max-width: 100%; padding: .15rem .45rem; background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; }
.composer-location-chip button { background: transparent; border: 0; color: var(--ink); cursor: pointer; padding: .3rem; overflow-wrap: anywhere; }
.composer-location-popup { position: absolute; left: 0; top: calc(100% + .4rem); z-index: 5; width: min(19rem, calc(100vw - 5rem)); padding: .85rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--paper); box-shadow: 0 8px 28px #0002; }
.composer-location-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.composer-location-heading button { background: transparent; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); }
.composer-location-popup input { width: 100%; margin-bottom: .55rem; }
.composer-location-suggestion { display: block; border: 0; border-radius: 1rem; padding: .4rem .65rem; margin-bottom: .65rem; background: var(--bg); color: var(--ink); cursor: pointer; }
.composer-location-popup[hidden], .composer-location-chip[hidden], .composer-location > button[hidden] { display: none; }
