/* ============================================================
   Astra Origins — Community (§03) page styles.
   Shared shell + post cards (feed.css) are global; this file adds the
   community list, single-community detail, and admin tools chrome.
   ============================================================ */

/* ── Toolbar (search + create) ────────────────────────────── */
.cmty-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.cmty-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.cmty-search .bi { color: var(--ink-3); font-size: 14px; }
.cmty-search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 13px; color: var(--ink); }
.cmty-create-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
}
.cmty-create-btn:hover { opacity: 0.9; }

/* ── Tabs ─────────────────────────────────────────────────── */
.cmty-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.cmty-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font-size: 12px; font-weight: 700; cursor: pointer; }
.cmty-tab:hover { background: var(--surface-2); color: var(--ink); }
.cmty-tab.is-on { background: var(--ink); color: #fff; }
.cmty-tab .bi { font-size: 13px; }

/* ── List grid + cards ────────────────────────────────────── */
.cmty-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cmty-card {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.cmty-card:hover, .cmty-card:focus-visible { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: 0 12px 28px oklch(0 0 0 / 0.1); outline: none; }
.cmty-card-cover { height: 64px; background-size: cover; background-position: center; position: relative; }
.cmty-card-cover-ic { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; opacity: 0.85; }
.cmty-card-body { padding: 10px 14px 4px; flex: 1; }
.cmty-card-name { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.cmty-card-meta { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--ink-3); letter-spacing: 0.08em; margin-top: 4px; }
.cmty-card-meta .bi { font-size: 11px; }
.cmty-card-purpose { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin: 8px 0 0; }
.cmty-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; margin-top: 8px; border-top: 1px solid var(--line); }
.cmty-card-open { font-size: 8px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.cmty-dot { opacity: 0.5; }

/* ── Pills / buttons ──────────────────────────────────────── */
.cmty-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: 0.1em; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); cursor: default; }
.cmty-pill-join { cursor: pointer; background: var(--ink); color: #fff; border-color: var(--ink); }
.cmty-pill-join:hover { opacity: 0.9; }
.cmty-pill-joined { color: oklch(0.6 0.15 145); border-color: oklch(0.6 0.15 145 / 0.4); background: oklch(0.6 0.15 145 / 0.1); }
.cmty-pill-pending { color: oklch(0.65 0.15 70); border-color: oklch(0.65 0.15 70 / 0.4); background: oklch(0.65 0.15 70 / 0.1); }
.cmty-pill-owner { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.cmty-pill-mod { color: oklch(0.6 0.16 250); border-color: oklch(0.6 0.16 250 / 0.4); background: oklch(0.6 0.16 250 / 0.1); }

.cmty-btn-primary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.cmty-btn-primary:hover { opacity: 0.9; }
.cmty-btn-ghost { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.cmty-btn-ghost:hover { background: var(--surface-2); }
.cmty-btn-danger { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 9px 16px; border-radius: 8px; border: 1px solid oklch(0.6 0.2 25 / 0.5); background: oklch(0.6 0.2 25 / 0.1); color: oklch(0.6 0.2 25); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.cmty-btn-danger:hover { background: oklch(0.6 0.2 25 / 0.18); }
.cmty-btn-mini { padding: 6px 10px; font-size: 9px; border-radius: 6px; }

/* ── Loader / states / skeletons ──────────────────────────── */
.cmty-loader, .cmty-posts-loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; font-size: 11px; letter-spacing: 0.16em; color: var(--ink-3); }
.cmty-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: cmty-spin 0.7s linear infinite; }
@keyframes cmty-spin { to { transform: rotate(360deg); } }
.cmty-state { padding: 28px; text-align: center; font-size: 11px; color: var(--ink-3); letter-spacing: 0.16em; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; margin-top: 6px; }
.cmty-sentinel { height: 1px; }

.cmty-skel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.cmty-skel-cover { height: 84px; }
.cmty-skel-body { padding: 16px; }
.cmty-sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; }
.cmty-sk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.06), transparent); transform: translateX(-100%); animation: cmty-shimmer 1.3s infinite; }
@keyframes cmty-shimmer { to { transform: translateX(100%); } }
.cmty-sk-line { height: 12px; margin-bottom: 8px; }

/* ── Back arrow ───────────────────────────────────────────── */
.cmty-back { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 0; background: transparent; color: var(--ink-2); font-size: 12px; font-weight: 700; padding: 4px 0; margin-bottom: 12px; }
.cmty-back:hover { color: var(--accent); }
.cmty-back .bi { font-size: 15px; }

/* ── Detail cover + header ────────────────────────────────── */
.cmty-cover { position: relative; height: 120px; border-radius: 14px; overflow: hidden; background-size: cover; background-position: center; }
.cmty-cover-stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 70% 60%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 45% 80%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 85% 25%, #fff 50%, transparent 51%); opacity: 0.5; }

/* Cover dropdown (Show / Upload) */
.cmty-cover-menu-wrap { position: absolute; top: 10px; right: 10px; }
.cmty-cover-edit { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 12px; border-radius: 8px; border: 1px solid oklch(1 0 0 / 0.3); background: oklch(0 0 0 / 0.45); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: 0.1em; backdrop-filter: blur(4px); }
.cmty-cover-edit:hover { background: oklch(0 0 0 / 0.65); }
.cmty-cover-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px oklch(0 0 0 / 0.18); padding: 5px; z-index: 5; }
.cmty-cover-menu[hidden] { display: none; }
.cmty-cover-menu button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 600; text-align: left; padding: 9px 10px; border-radius: 7px; cursor: pointer; }
.cmty-cover-menu button:hover { background: var(--surface-2); }
.cmty-cover-menu .bi { color: var(--ink-3); font-size: 13px; }

/* Cover lightbox */
.cmty-lightbox { position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 24px; background: oklch(0 0 0 / 0.8); backdrop-filter: blur(3px); }
.cmty-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 24px 60px oklch(0 0 0 / 0.5); }
.cmty-lightbox-empty { color: oklch(0.8 0 0); letter-spacing: 0.16em; font-size: 12px; }
.cmty-lightbox-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: oklch(1 0 0 / 0.15); color: #fff; font-size: 16px; cursor: pointer; }
.cmty-lightbox-close:hover { background: oklch(1 0 0 / 0.28); }

/* Header — sits clearly under the cover, no avatar. */
.cmty-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 0 2px; margin: 14px 0 16px; }
.cmty-head-meta { flex: 1; min-width: 0; }
.cmty-head-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.cmty-head-sub { font-size: 9px; color: var(--ink-3); letter-spacing: 0.1em; margin-top: 6px; }
.cmty-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Detail tabs + panels ─────────────────────────────────── */
.cmty-dtabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.cmty-dtab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font-size: 12px; font-weight: 700; cursor: pointer; }
.cmty-dtab:hover { background: var(--surface-2); color: var(--ink); }
.cmty-dtab.is-on { background: var(--ink); color: #fff; }
.cmty-dpanel { animation: cmty-fade 0.3s ease; }
.cmty-dpanel[hidden] { display: none; }
@keyframes cmty-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Community composer trigger ───────────────────────────── */
.cmty-composer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; margin-bottom: 14px; }
.cmty-composer:hover { border-color: var(--accent-line); }
.cmty-composer-ph { flex: 1; color: var(--ink-3); font-size: 13px; }
.cmty-composer .bi { color: var(--accent); }
.cmty-join-hint { padding: 12px 16px; margin-bottom: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); text-align: center; font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); }

/* Constrain reused post media to the column width. */
#f-posts-container img, #f-posts-container video { max-width: 100%; height: auto; }

/* ── Section header strip ─────────────────────────────────── */
.cmty-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.cmty-sh-h { font-size: 14px; font-weight: 800; letter-spacing: -0.005em; }
.cmty-sh-meta { font-size: 9px; color: var(--ink-3); letter-spacing: 0.14em; font-weight: 700; }

/* ── About ────────────────────────────────────────────────── */
.cmty-about-text { font-size: 13px; line-height: 1.7; color: var(--ink-2); margin: 0 0 16px; max-width: 70ch; }
.cmty-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cmty-fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 14px; text-align: center; }
.cmty-fact-n { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.cmty-fact-l { font-size: 8px; color: var(--ink-3); letter-spacing: 0.1em; margin-top: 4px; font-weight: 700; }

/* ── Rules ────────────────────────────────────────────────── */
.cmty-rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cmty-rule { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.cmty-rule-n { font-size: 13px; font-weight: 800; color: var(--accent); }
.cmty-rule-text { font-size: 13px; line-height: 1.5; color: var(--ink); }

/* ── People ───────────────────────────────────────────────── */
.cmty-people { display: flex; flex-direction: column; gap: 6px; }
.cmty-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.cmty-person-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.cmty-person-av img { width: 100%; height: 100%; object-fit: cover; }
.cmty-person-meta { flex: 1; min-width: 0; }
.cmty-person-name { font-size: 13px; font-weight: 700; }
.cmty-person-handle { font-size: 9px; color: var(--ink-3); letter-spacing: 0.08em; margin-top: 2px; }

/* ── Create / generic modal ───────────────────────────────── */
.cmty-modal { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 16px; }
.cmty-modal.is-open { display: flex; }
.cmty-modal-backdrop { position: absolute; inset: 0; background: oklch(0 0 0 / 0.55); backdrop-filter: blur(2px); }
.cmty-modal-dialog { position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px oklch(0 0 0 / 0.3); }
.cmty-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmty-modal-head h3 { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; margin: 0; }
.cmty-modal-close { border: 0; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 16px; }
.cmty-modal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.cmty-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.cmty-modal-error { color: oklch(0.6 0.2 25); font-size: 11px; letter-spacing: 0.04em; }

/* ── Fields ───────────────────────────────────────────────── */
.cmty-field { display: flex; flex-direction: column; gap: 6px; }
.cmty-field label { font-size: 11px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.02em; }
.cmty-field input[type="text"], .cmty-field input[type="search"], .cmty-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 13px; outline: none; }
.cmty-field input:focus, .cmty-field textarea:focus { border-color: var(--accent-line); }
.cmty-field textarea { resize: vertical; }
.cmty-hint { font-size: 10px; color: var(--ink-3); font-weight: 400; }
.cmty-radio-row { display: flex; flex-direction: column; gap: 8px; }
.cmty-radio { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.cmty-cover-preview { margin-top: 8px; border-radius: 10px; overflow: hidden; }
.cmty-cover-preview img { width: 100%; display: block; }

/* ── Tools ────────────────────────────────────────────────── */
.cmty-tools-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cmty-tools-foot { display: flex; justify-content: flex-end; }
.cmty-rule-add { display: flex; gap: 8px; }
.cmty-rule-add input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 13px; outline: none; }
.cmty-tools-rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cmty-tools-rule { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.cmty-tools-rule-text { font-size: 13px; color: var(--ink); }
.cmty-tools-rule-actions { display: flex; gap: 4px; }
.cmty-icon-btn { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: 13px; }
.cmty-icon-btn:hover { background: var(--surface); color: var(--ink); }
.cmty-icon-btn.cmty-danger:hover { color: oklch(0.6 0.2 25); }
.cmty-tools-members { display: flex; flex-direction: column; gap: 6px; }
.cmty-tools-member { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.cmty-tools-member .cmty-person-av { width: 34px; height: 34px; }
.cmty-tools-member-actions { display: flex; gap: 6px; }
.cmty-status-pending { color: oklch(0.65 0.15 70); }
.cmty-danger-text { color: oklch(0.6 0.2 25); }
.cmty-danger-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; border-color: oklch(0.6 0.2 25 / 0.35); }
.cmty-danger-title { font-size: 13px; font-weight: 800; }
.cmty-danger-desc { font-size: 11px; color: var(--ink-3); margin: 4px 0 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) { .cmty-list { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .cmty-tabs, .cmty-dtabs { overflow-x: auto; flex-wrap: nowrap; }
  .cmty-tab, .cmty-dtab { white-space: nowrap; }
  .cmty-facts { grid-template-columns: 1fr; }
  .cmty-head { flex-wrap: wrap; }
  .cmty-danger-card { flex-direction: column; align-items: stretch; }
}

/* ── Updates: list panels, discover, 75% post feeds, create-modal ─── */

/* Post feeds render at 75% width, left-aligned (per request). */
.cmty-posts-wrap, .cmty-detail #f-posts-container { max-width: 75%; }
@media (max-width: 900px) { .cmty-posts-wrap, .cmty-detail #f-posts-container { max-width: 100%; } }

/* List panels (Home / Explore / Discover) */
.cmty-panel { animation: cmty-fade 0.3s ease; }
.cmty-panel[hidden] { display: none; }
.cmty-list-compact { margin-bottom: 4px; }

/* Discover link + empty joined state */
.cmty-link-btn { border: 0; background: transparent; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: 0.12em; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.cmty-link-btn:hover { text-decoration: underline; }
.cmty-empty-joined { grid-column: 1 / -1; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; text-align: center; }

/* Create-community modal (old-style structure) */
.cmty-modal-head .cmty-modal-title { flex: 1; margin: 0 4px; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; text-transform: none; }
.cmty-modal-body form .cmty-field { margin-bottom: 14px; }
.cmty-form-intro { font-size: 12px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.5; }
.cmty-field-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cmty-cover-pick { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 8px; border: 1px dashed var(--line-2); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.cmty-cover-pick:hover { border-color: var(--accent-line); color: var(--accent); }
.cmty-cover-preview { position: relative; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.cmty-cover-preview img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 6px; display: block; }
.cmty-cover-remove { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: oklch(0 0 0 / 0.5); color: #fff; cursor: pointer; }
.cmty-cover-remove:hover { background: oklch(0 0 0 / 0.7); }
.cmty-membership { margin-top: 4px; }
.cmty-membership-title { font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.cmty-radio-block { align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; cursor: pointer; }
.cmty-radio-block input { margin-top: 3px; }
.cmty-radio-h { display: block; font-size: 13px; font-weight: 700; }
.cmty-radio-sub { display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }

/* ── Updates v1.2: compact horizontal "Your Communities", post gaps, scrollbars ── */

/* Your Communities — 3 per line, horizontal scroll with a custom scrollbar. */
.cmty-list-compact {
  display: flex;
  grid-template-columns: none;            /* override the grid from .cmty-list */
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  margin-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;                  /* Firefox */
  scrollbar-color: var(--line-2) transparent;
}
.cmty-list-compact .cmty-card {
  flex: 0 0 calc((100% - 20px) / 3);      /* 3 per line (two 10px gaps) */
  min-width: 170px;
  scroll-snap-align: start;
}
.cmty-list-compact .cmty-card-cover { height: 50px; }
.cmty-list-compact .cmty-card-cover-ic { font-size: 18px; }
.cmty-list-compact .cmty-card-purpose { display: none; }
.cmty-list-compact .cmty-card-name { font-size: 13px; }
.cmty-list-compact .cmty-card-body { padding: 8px 12px 2px; }
.cmty-list-compact .cmty-card-meta { font-size: 8px; }
.cmty-list-compact .cmty-card-foot { padding: 8px 12px; }
.cmty-list-compact .cmty-empty-joined { flex: 1 0 100%; }

/* WebKit custom scrollbar — horizontal (joined strip). */
.cmty-list-compact::-webkit-scrollbar { height: 8px; }
.cmty-list-compact::-webkit-scrollbar-track { background: transparent; }
.cmty-list-compact::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.cmty-list-compact::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* Spacing between post cards in the community feeds. */
[data-cmty-home-posts] .f-post,
[data-cmty-explore-posts] .f-post,
.cmty-detail #f-posts-container .f-post { margin-bottom: 16px; }

/* Custom scrollbar on the create-community modal. */
.cmty-modal-dialog { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.cmty-modal-dialog::-webkit-scrollbar { width: 8px; }
.cmty-modal-dialog::-webkit-scrollbar-track { background: transparent; }
.cmty-modal-dialog::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.cmty-modal-dialog::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* Compact placeholders + empty state for the horizontal "Your Communities" strip. */
.cmty-list-compact .cmty-skel { flex: 0 0 calc((100% - 20px) / 3); min-width: 170px; }
.cmty-list-compact .cmty-skel-cover { height: 50px; }
.cmty-list-compact .cmty-skel-body { padding: 8px 12px; }
.cmty-list-compact .cmty-state { flex: 1 0 100%; }

.cmty-empty-joined {
  flex: 1 0 100%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 18px; text-align: center;
  border: 1px dashed var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--ink-2);
}
.cmty-empty-ic { font-size: 26px; color: var(--ink-3); }
.cmty-empty-text { font-size: 13px; color: var(--ink-2); }
.cmty-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
