:root {
  --ink: #1a2420;
  --ink-soft: #3d4a43;
  --paper: #f3f0e8;
  --paper-2: #e8efe9;
  --panel: rgba(255, 252, 246, 0.92);
  --line: rgba(26, 36, 32, 0.12);
  --forest: #1f4d3a;
  --forest-deep: #123528;
  --moss: #2f6b4f;
  --gold: #c4a35a;
  --gold-soft: #e2c98a;
  --danger: #8b2e2e;
  --ok: #1f5c3a;
  --shadow: 0 18px 50px rgba(18, 53, 40, 0.12);
  --radius: 14px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(196, 163, 90, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(47, 107, 79, 0.16), transparent 50%),
    linear-gradient(180deg, #edf3ef 0%, var(--paper) 40%, #e7efe9 100%);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}
a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--moss); }
img { max-width: 100%; display: block; }
.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-width: 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(18, 53, 40, 0.92);
  border-bottom: 1px solid rgba(226, 201, 138, 0.25);
}
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
  min-height: 0;
  padding: .55rem 0 .45rem;
}
.header-top {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 48px;
}
.header-search {
  flex: 1 1 160px;
  max-width: 260px;
  min-width: 120px;
}
.header-account {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-left: auto;
  flex-shrink: 0;
}
.header-text-link {
  color: rgba(255,255,255,.92) !important;
  font-weight: 600;
  font-size: .72rem;
  white-space: nowrap;
}
.header-text-link:hover { color: var(--gold-soft) !important; }
.header-account-btn {
  padding: .08rem .45rem;
  font-size: .72rem;
  border-width: 1px;
  line-height: 1.15;
}
.header-account .btn-ghost {
  border-width: 1px;
  border-color: rgba(255,255,255,.32);
}
.header-account .btn-primary {
  background: var(--gold);
  color: var(--forest-deep) !important;
}
.header-account .btn-primary:hover { background: var(--gold-soft); }
.header-icon-link,
.header-avatar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft) !important;
  flex-shrink: 0;
}
.header-icon-link {
  width: 36px;
  height: 36px;
}
.header-icon-link:hover,
.header-avatar-link:hover { color: #fff !important; }
.header-msg-icon {
  width: 36px;
  height: 36px;
  display: block;
}
.header-icon-link .nav-badge {
  position: absolute;
  top: -6px;
  right: -8px;
}
.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #d9e5dd;
  border: 2px solid rgba(226, 201, 138, .7);
}
.header-avatar-link:hover .header-avatar,
.header-user-menu[open] .header-avatar {
  border-color: #fff;
}
.header-user-menu {
  position: relative;
}
.header-user-menu > summary {
  list-style: none;
  cursor: pointer;
}
.header-user-menu > summary::-webkit-details-marker,
.header-user-menu > summary::marker {
  display: none;
}
.header-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  min-width: 12.5rem;
  background: #fffef8;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: .35rem 0;
  z-index: 60;
}
.header-user-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem 1rem;
  color: var(--ink) !important;
  font-weight: 600;
  font-size: .92rem;
}
.header-user-dropdown a:hover {
  background: rgba(31, 77, 58, .08);
  color: var(--forest) !important;
}
.header-user-dropdown .nav-badge {
  position: static;
}
.header-user-sep {
  height: 1px;
  background: var(--line);
  margin: .3rem 0;
}
.header-search input {
  background: #fff;
  border-color: rgba(255,255,255,.55);
  color: var(--ink);
  padding: .5rem .85rem;
}
.header-search input::placeholder { color: #8a938e; }
.header-search input::-webkit-search-decoration,
.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.header-search input:focus {
  outline: 2px solid var(--gold-soft);
  outline-offset: 1px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--forest-deep);
  font-size: .72rem;
  font-weight: 700;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #fff !important;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  border: 0;
  flex-shrink: 0;
}
.brand-text {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand-text span { color: var(--gold-soft); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .2rem;
}
.site-nav a {
  color: rgba(255,255,255,.9);
  font-weight: 500;
  font-size: .88rem;
  padding: .2rem .42rem;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--gold-soft); }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: 8px;
  padding: .35rem .6rem;
  font-size: 1.1rem;
}
.site-main { padding: 1.75rem 0 3rem; }
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255,252,246,.7);
  padding: 2rem 0;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  gap: 1rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-copy { color: var(--ink-soft); margin: 0; font-size: .92rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: .2s ease;
}
.btn-primary { background: var(--forest); color: #fff !important; }
.btn-primary:hover { background: var(--moss); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,.35);
  color: #fff !important;
}
.btn-outline {
  background: transparent;
  border-color: var(--forest);
  color: var(--forest) !important;
}
.btn-sm { padding: .35rem .8rem; font-size: .92rem; }
.btn-danger { background: var(--danger); color: #fff !important; }

.flash {
  padding: .85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: #fff;
}
.flash-success { border-color: rgba(31,92,58,.35); background: #eef7f1; color: var(--ok); }
.flash-error { border-color: rgba(139,46,46,.35); background: #fbf1f1; color: var(--danger); }
.flash-info { background: #f7f3e8; }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin: -1.75rem calc(50% - 50vw) 1.5rem;
  width: 100vw;
  max-width: 100vw;
  min-height: 280px;
  display: grid;
  align-items: end;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(10, 28, 22, .35) 0%, rgba(10, 28, 22, .78) 70%, rgba(10, 28, 22, .9) 100%),
    url("../img/hero.jpg") center/cover no-repeat,
    linear-gradient(135deg, #123528, #1f4d3a 45%, #2a3d2f);
}
.hero-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 1.75rem;
  animation: rise .8s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.05;
  margin: 0 0 .6rem;
  letter-spacing: .01em;
}
.hero h1 span { color: var(--gold-soft); }
.hero p {
  max-width: 34rem;
  font-size: 1.15rem;
  color: rgba(255,255,255,.9);
  margin: 0 0 1.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero .btn-primary { background: var(--gold); color: var(--forest-deep) !important; }
.hero .btn-ghost { border-color: rgba(255,255,255,.5); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 .35rem;
}
.section-lead { color: var(--ink-soft); margin: 0 0 .85rem; max-width: 40rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature {
  padding: 1.25rem 1.2rem;
  border-top: 3px solid var(--gold);
  background: transparent;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 .4rem;
}
.feature p { margin: 0; color: var(--ink-soft); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.panel + .panel { margin-top: 1rem; }

.auth-wrap {
  width: min(460px, 100%);
  margin: 1rem auto;
}
.form-row { margin-bottom: 1rem; }
.form-grid-2,
.form-grid-3 {
  display: grid;
  gap: .75rem;
}
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}
.filter-bar input[type="search"],
.filter-bar input[type="text"] {
  flex: 1 1 12rem;
  min-width: 0;
}
label { display: block; font-weight: 600; margin-bottom: .35rem; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .7rem .85rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
.form-help { color: var(--ink-soft); font-size: .9rem; margin-top: .3rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
input[type="file"] {
  font: inherit;
  color: var(--ink-soft);
  max-width: 100%;
}
input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  color: var(--forest);
  background: #fff;
  border: 1px solid var(--forest);
  border-radius: 999px;
  padding: .45rem 1rem;
  margin-right: .65rem;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
  background: var(--paper-2);
  border-color: var(--moss);
  color: var(--moss);
}

.layout-feed {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  gap: 1.25rem;
  align-items: start;
}
.layout-feed.is-profile {
  grid-template-columns: 280px minmax(0, 1fr);
}
.layout-feed.is-group {
  grid-template-columns: minmax(0, 1fr) 260px;
}
.layout-feed > *,
.cl-layout > *,
.detail-grid > *,
.events-layout > *,
.grid-3 > * {
  min-width: 0;
}
.side-card h3 {
  font-family: var(--font-display);
  margin: 0 0 .75rem;
  font-size: 1.4rem;
}
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li { margin-bottom: .55rem; }
.composer textarea { min-height: 90px; }
.composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: .75rem;
}
.composer-tools input[type="url"],
.composer-tools input[type="file"] { flex: 1 1 12rem; min-width: 0; }

.post-card {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  animation: fadeIn .35s ease both;
}
.post-card:last-child { border-bottom: 0; }
.post-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .65rem; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #d9e5dd;
  border: 2px solid rgba(196,163,90,.45);
}
.post-author { font-weight: 700; color: var(--ink); }
.post-meta { color: var(--ink-soft); font-size: .9rem; }
.post-body { margin: .35rem 0 .75rem; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.inline-image-link {
  display: inline-block;
  max-width: min(350px, 100%);
  margin: .4rem 0;
  vertical-align: top;
}
.inline-image-preview {
  display: block;
  max-width: min(350px, 100%);
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f4f7f5;
}
.inline-image-fallback { display: none; overflow-wrap: anywhere; }
.inline-image-preview.is-broken { display: none; }
.inline-image-preview.is-broken + .inline-image-fallback { display: inline; }
.post-media {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: .75rem;
  background: #111;
}
.post-media img { width: 100%; max-height: 480px; object-fit: cover; }
.post-youtube { position: relative; padding-top: 56.25%; }
.post-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.post-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.action-btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: .35rem .2rem;
}
.action-btn:hover, .action-btn.is-liked, .copy-link-btn.is-copied { color: var(--forest); }
.permalink-post .post-card { border: 0; box-shadow: none; padding-top: 0; padding-bottom: 0; }
.amen-wrap {
  position: relative;
  display: inline-block;
}
.amen-tip {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  min-width: 180px;
  max-width: 260px;
  max-height: 240px;
  overflow: auto;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: .55rem .7rem;
}
.amen-wrap:hover .amen-tip:not(:empty),
.amen-wrap:focus-within .amen-tip:not(:empty) {
  display: block;
}
.amen-tip-title {
  margin: 0 0 .35rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.amen-tip ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.amen-tip li {
  margin: 0;
  padding: .18rem 0;
}
.amen-tip a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.amen-tip a:hover { color: var(--forest); }
.comments { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--line); }
.comment {
  display: flex;
  gap: .6rem;
  margin-bottom: .65rem;
}
.comment .avatar { width: 32px; height: 32px; }
.comment-body {
  background: rgba(31, 77, 58, 0.06);
  border-radius: 12px;
  padding: .55rem .75rem;
  flex: 1;
}
.comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .15rem;
}
.comment-time {
  color: var(--ink-soft);
  font-size: .8rem;
  white-space: nowrap;
}
.comment-form { display: flex; gap: .5rem; }
.comment-form input { flex: 1; }

.profile-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  background:
    linear-gradient(180deg, transparent, rgba(10,28,22,.75)),
    var(--cover, linear-gradient(135deg, #1f4d3a, #2f6b4f));
  color: #fff;
  margin-bottom: 1rem;
}
.profile-hero-inner {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.1rem;
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  min-width: 0;
}
.profile-hero h1 {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  overflow-wrap: anywhere;
}
.profile-hero .avatar {
  width: 96px;
  height: 96px;
  border-width: 3px;
}
.profile-meta { opacity: .9; }
.profile-hero .btn-primary { background: var(--gold); color: var(--forest-deep) !important; }

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1rem;
}
.list-toolbar form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  flex: 1;
}
.cl-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
}
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list a {
  display: block;
  padding: .45rem 0;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
.cat-list a.active, .cat-list a:hover {
  color: var(--forest);
  border-bottom-color: var(--gold);
}
.job-tabs {
  display: flex;
  gap: .15rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.job-tabs a {
  padding: .7rem 1.1rem;
  color: var(--ink-soft);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.job-tabs a.active {
  color: var(--forest-deep);
  border-bottom-color: var(--forest);
}
.job-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .85rem;
}
.job-cat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.job-cat-card:hover { border-color: var(--forest); }
.job-cat-card h3 {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.listing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  min-width: 0;
}
.listing-row-main {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.listing-row-main h3 { color: var(--ink); }
.listing-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: #dfe8e2;
}
.listing-row h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.listing-meta { color: var(--ink-soft); font-size: .92rem; }
.price {
  font-weight: 700;
  color: var(--forest);
  white-space: nowrap;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.25rem;
}
.muted { color: var(--ink-soft); }
.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-soft);
}
.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: rgba(196,163,90,.2);
  color: var(--forest-deep);
  font-size: .8rem;
  font-weight: 700;
}
.pagination {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.25rem;
}
.pagination a, .pagination span {
  min-width: 2.15rem;
  padding: .4rem .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  line-height: 1.2;
}
.pagination .current { background: var(--forest); color: #fff; border-color: var(--forest); }
.pagination .pager-arrow { font-weight: 700; }
.pagination .pager-disabled {
  opacity: .4;
  cursor: default;
  background: #f4f4f4;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.group-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.group-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.group-cover {
  height: 110px;
  background: linear-gradient(135deg, var(--forest-deep), var(--moss));
}
.group-tile-body { padding: 1rem; }
.group-tile > a { color: inherit; display: block; }
.group-tile.is-pinned {
  border-color: var(--forest);
}
.group-tile h3 .badge { font-family: var(--font-sans); font-size: .7rem; vertical-align: middle; }
.group-tile-copy { padding: 0 1rem 1rem; }

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .7rem;
}
.member-chip {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.member-chip:last-child { border-bottom: 0; }
.member-chip .avatar { width: 32px; height: 32px; }

.search-block + .search-block { margin-top: 1.25rem; }
.search-hit {
  display: flex;
  gap: .85rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  min-width: 0;
}
.search-hit:last-child { border-bottom: 0; }
.search-hit h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.church-hit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  flex-shrink: 0;
}

.thread-list a {
  display: block;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.thread-list a:last-child { border-bottom: 0; }
.thread-list .unread { font-weight: 700; }
.thread-list a::after { content: ""; display: table; clear: both; }
.message-thread { display: flex; flex-direction: column; gap: .65rem; }
.message-bubble {
  max-width: min(520px, 90%);
  padding: .7rem .9rem;
  border-radius: 14px;
  background: rgba(31, 77, 58, 0.08);
}
.message-bubble.mine {
  margin-left: auto;
  background: var(--forest);
  color: #fff;
}
.message-bubble .msg-meta {
  font-size: .8rem;
  opacity: .75;
  margin-bottom: .2rem;
}

.cal-wrap { overflow: hidden; }
.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .4rem;
  margin-bottom: .45rem;
}
.cal-nav strong { font-size: .92rem; }
.cal-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 1px solid var(--line);
}
.cal-table th {
  width: 14.28%;
  padding: .25rem .1rem;
  text-align: center;
  font-size: .66rem;
  font-weight: 700;
  color: var(--forest-deep);
  background: rgba(31, 77, 58, 0.08);
  border-bottom: 1px solid var(--line);
}
.cal-table td {
  width: 14.28%;
  height: 62px;
  vertical-align: top;
  border: 1px solid var(--line);
  padding: .18rem;
  background: #fff;
}
.cal-table td.is-empty { background: #f6f4ee; }
.cal-table td.is-today { background: #f7f3e8; box-shadow: inset 0 0 0 2px var(--gold); }
.cal-num {
  font-weight: 700;
  font-size: .7rem;
  margin-bottom: .1rem;
}
.cal-day-scroll {
  max-height: 40px;
  overflow-y: auto;
  overflow-x: hidden;
}
.cal-event {
  display: block;
  font-size: .62rem;
  line-height: 1.2;
  margin: 0 0 .1rem;
  padding: .06rem .18rem;
  border-radius: 3px;
  background: rgba(31, 77, 58, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event.is-followed,
.upcoming-item.is-followed {
  background: rgba(196, 163, 90, 0.28);
}

.events-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.events-col {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.events-cal-col,
.events-upcoming-col {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.upcoming-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: .15rem;
}
.upcoming-day { margin-bottom: .85rem; }
.upcoming-day h3 {
  margin: 0 0 .35rem;
  font-size: .92rem;
  font-family: var(--font-body);
}
.upcoming-day-scroll {
  max-height: 168px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.upcoming-item {
  display: block;
  padding: .5rem .65rem;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}
.upcoming-item-row {
  display: flex;
  gap: .45rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.upcoming-item-row:last-child { border-bottom: 0; }
.upcoming-item strong { display: block; font-size: .92rem; }
.upcoming-item.is-featured {
  box-shadow: inset 3px 0 0 var(--gold);
}
.event-flyer {
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.event-flyer img {
  width: 100%;
  display: block;
  max-height: 420px;
  object-fit: cover;
}
.rsvp-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.btn-ghost-ink {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft) !important;
}
.interest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .75rem;
}
.interest-chip {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin: .4rem 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .layout-feed,
  .layout-feed.is-profile,
  .layout-feed.is-group,
  .cl-layout,
  .detail-grid,
  .grid-3,
  .events-layout {
    grid-template-columns: 1fr !important;
  }
  .listing-row { grid-template-columns: minmax(0, 1fr) auto; }
  .listing-row-main { grid-template-columns: 90px minmax(0, 1fr); }
  .listing-row-main .price { grid-column: 2; }
  .header-search { max-width: none; }
  .events-cal-col,
  .events-upcoming-col,
  .events-col {
    position: static;
    max-height: none;
  }
  .events-upcoming-col,
  .events-col { max-height: 70vh; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand account toggle"
      "search search search";
    align-items: center;
    gap: .5rem .65rem;
  }
  .brand { grid-area: brand; min-width: 0; }
  .header-account { grid-area: account; margin-left: 0; }
  .nav-toggle { grid-area: toggle; }
  .header-search {
    grid-area: search;
    flex: none;
    max-width: none;
    order: unset;
    min-width: 0;
  }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: .65rem;
    gap: .1rem;
  }
  .site-nav a { padding: .45rem .2rem; font-size: .98rem; }
  .site-nav.is-open { display: flex; }
  .cal-table td { height: 54px; }
  .header-inner { padding: .45rem 0 .35rem; }
  .site-main { padding: 1.15rem 0 2.25rem; }
  .panel { padding: 1rem .9rem; }
}
@media (max-width: 640px), (orientation: portrait) and (max-width: 900px) {
  .container { width: min(1120px, calc(100% - 1.2rem)); }
  .hero-inner { width: min(1120px, calc(100% - 1.2rem)); }
  .form-grid-2,
  .form-grid-3,
  .form-row[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .listing-row,
  .listing-row-main {
    grid-template-columns: 1fr !important;
  }
  .listing-row-main .price { grid-column: 1; }
  .listing-thumb {
    width: 100%;
    height: 160px;
  }
  .amen-tip { min-width: 0; max-width: min(260px, calc(100vw - 2rem)); }
  .comment-form { flex-wrap: wrap; }
  .comment-form input { min-width: 0; }
  .comment-head { flex-wrap: wrap; }
  .profile-hero { min-height: 200px; }
  .profile-hero .avatar { width: 72px; height: 72px; }
  .job-cat-grid { grid-template-columns: 1fr; }
  .group-grid { grid-template-columns: 1fr; }
  .toolbar input, .toolbar select { min-width: 0; width: 100%; }
  .cal-wrap,
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}
@media (max-width: 420px) {
  .brand-text { font-size: 1.35rem; }
  .brand-logo { width: 36px; height: 36px; }
  .header-account-btn { padding: .08rem .35rem; }
}

html.device-phone .layout-feed,
html.device-phone .layout-feed.is-profile,
html.device-phone .layout-feed.is-group,
html.device-phone .cl-layout,
html.device-phone .detail-grid,
html.device-phone .grid-3,
html.device-phone .events-layout,
html.device-tablet.orientation-portrait .layout-feed,
html.device-tablet.orientation-portrait .layout-feed.is-profile,
html.device-tablet.orientation-portrait .layout-feed.is-group,
html.device-tablet.orientation-portrait .cl-layout,
html.device-tablet.orientation-portrait .detail-grid,
html.device-tablet.orientation-portrait .grid-3,
html.device-tablet.orientation-portrait .events-layout {
  grid-template-columns: 1fr !important;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .85rem;
  margin: 1rem 0 1.25rem;
}
.admin-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  display: block;
}
a.admin-stat:hover {
  border-color: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
}
.admin-stat strong { display: block; font-size: 1.7rem; line-height: 1.1; }
.admin-stat span { color: var(--ink-soft); font-size: .9rem; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--line);
}
.admin-list li:last-child { border-bottom: 0; }
.visit-stats { margin: 0; }
.visit-stats th:nth-child(n+2),
.visit-stats td:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.visit-stats td:nth-child(n+2) { font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: .65rem .5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}
.inline-role {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.inline-role select { width: auto; min-width: 140px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin: 1rem 0;
}
.toolbar input, .toolbar select { width: auto; min-width: 160px; flex: 1; }
.toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
  flex: 0 0 auto;
  color: var(--ink-soft);
  cursor: pointer;
}
.toolbar-toggle input {
  width: auto;
  min-width: 0;
  flex: none;
}
