/* مجتمع مستشارك — social shell (v8) */
:root {
  --cm-green: #006c35;
  --cm-green-mid: #0a8a48;
  --cm-ink: #14261c;
  --cm-muted: #5a6b60;
  --cm-line: #dce8e0;
  --cm-bg: #e8f0eb;
  --cm-card: #ffffff;
  --cm-radius: 16px;
  --cm-shadow: 0 10px 32px rgba(15, 40, 28, 0.09);
  --cm-font: "Cairo", system-ui, sans-serif;
  --cm-messenger: #00a859;
  --cm-messenger-dark: #006c35;
  --cm-fb-blue: #1877f2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--cm-font);
  color: var(--cm-ink);
  background:
    radial-gradient(1000px 480px at 92% -8%, rgba(10, 138, 72, 0.14), transparent 55%),
    radial-gradient(700px 360px at 0% 20%, rgba(0, 132, 255, 0.06), transparent 50%),
    linear-gradient(180deg, #f4faf6 0%, var(--cm-bg) 40%, #e6efe9 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.cm-post-head > a {
  display: flex;
  flex: 0 0 auto;
}

.cm-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cm-line);
}

.cm-top-inner {
  width: min(1180px, calc(100% - 1.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.cm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.cm-brand img {
  height: 42px;
  width: auto;
  display: block;
}

.cm-brand span {
  font-weight: 800;
  color: var(--cm-green);
  font-size: 0.95rem;
}

.cm-search {
  flex: 1;
  max-width: 420px;
}

.cm-search input {
  width: 100%;
  border: 1px solid var(--cm-line);
  background: var(--cm-bg);
  border-radius: 999px;
  padding: 0.55rem 1rem;
}

.cm-top-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-inline-start: auto;
}

.cm-link-quiet {
  font-size: 0.85rem;
  color: var(--cm-muted);
  font-weight: 600;
}

.cm-lang {
  border: 1px solid var(--cm-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.cm-btn {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

.cm-btn:hover {
  transform: translateY(-1px);
}

.cm-btn-primary {
  background: linear-gradient(145deg, #0a8a48, #006c35);
  color: #fff;
}

.cm-btn-ghost {
  background: #fff;
  border: 1px solid var(--cm-line);
  color: var(--cm-ink);
}

.cm-btn-block {
  width: 100%;
}

.cm-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--cm-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.7rem 0.2rem 0.2rem;
  cursor: pointer;
}

.cm-avatar-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cm-bg);
}

.cm-layout {
  width: min(1180px, calc(100% - 1.5rem));
  margin: 1.15rem auto 2.5rem;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.cm-card {
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  box-shadow: var(--cm-shadow);
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.cm-profile-hero {
  height: 72px;
  margin: -1rem -1rem 0;
  border-radius: var(--cm-radius) var(--cm-radius) 0 0;
  background:
    linear-gradient(125deg, #004d26 0%, #006c35 40%, #0a8a48 70%, #c49a6c 100%);
}

.cm-profile-body {
  margin-top: -28px;
  text-align: center;
}

.cm-profile-body h2 {
  margin: 0.45rem 0 0.2rem;
  font-size: 1.05rem;
}

.cm-muted {
  color: var(--cm-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.cm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0a8a48, #004d26);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
  overflow: hidden;
}

.cm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-avatar-lg {
  width: 64px;
  height: 64px;
  margin-inline: auto;
  border: 3px solid #fff;
  font-size: 1.3rem;
}

.cm-nav-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem;
}

.cm-nav-card a,
.cm-nav-card button {
  text-align: inherit;
  border: none;
  background: transparent;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  color: var(--cm-ink);
}

.cm-nav-card a.is-active,
.cm-nav-card a:hover,
.cm-nav-card button:hover {
  background: rgba(10, 138, 72, 0.1);
  color: var(--cm-green);
}

.cm-composer-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.cm-composer-trigger {
  flex: 1;
  text-align: inherit;
  border: 1px solid var(--cm-line);
  background: var(--cm-bg);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  color: var(--cm-muted);
  cursor: pointer;
  font-weight: 600;
}

.cm-feed {
  display: grid;
  gap: 0.85rem;
}

.cm-post {
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  box-shadow: var(--cm-shadow);
  padding: 1rem;
  animation: cm-post-in 0.35s ease both;
}

@keyframes cm-post-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cm-post.is-fresh {
  animation: cm-post-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cm-post-pop {
  0% {
    opacity: 0;
    transform: scale(0.97) translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.cm-post-head {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cm-post-head strong {
  display: block;
  font-size: 0.95rem;
}

.cm-post-head time {
  font-size: 0.75rem;
  color: var(--cm-muted);
}

.cm-post-body {
  white-space: pre-wrap;
  line-height: 1.65;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.cm-post-images {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
}

.cm-post-images img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  transition: filter 0.2s ease;
  min-height: 48px;
}

.cm-post-images img:hover {
  filter: brightness(0.96);
}

.cm-post-images [data-lightbox="video"],
.cm-post video[data-lightbox] {
  cursor: zoom-in;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.cm-post-images.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.cm-post-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--cm-muted);
  margin-bottom: 0.45rem;
}

.cm-post-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--cm-line);
  padding-top: 0.35rem;
}

.cm-post-actions button {
  border: none;
  background: transparent;
  padding: 0.55rem;
  border-radius: 8px;
  font-weight: 700;
  color: var(--cm-muted);
  cursor: pointer;
}

.cm-post-actions button:hover,
.cm-post-actions button.is-on {
  background: rgba(10, 138, 72, 0.08);
  color: var(--cm-green);
}

.cm-post-actions button.is-on.is-pulse {
  animation: cm-like-pulse 0.45s ease;
}

@keyframes cm-like-pulse {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.cm-suggest {
  display: grid;
  gap: 0.55rem;
}

.cm-suggest-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cm-suggest-row strong {
  font-size: 0.88rem;
  display: block;
}

.cm-suggest-row button {
  margin-inline-start: auto;
  border: 1px solid var(--cm-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.cm-modal[hidden] {
  display: none !important;
}

.cm-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 14, 0.45);
}

.cm-modal-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  z-index: 1;
}

/* Soft UI / Neumorphism auth */
.cm-auth-modal {
  --soft-bg: #e0e5ec;
  --soft-text: #3d4a5c;
  --soft-muted: #8b95a5;
  --soft-dark: #b8b9be;
  --soft-light: #ffffff;
  --soft-raised: 6px 6px 12px var(--soft-dark), -6px -6px 12px var(--soft-light);
  --soft-inset: inset 6px 6px 12px var(--soft-dark), inset -6px -6px 12px var(--soft-light);
  --soft-raised-sm: 3px 3px 6px var(--soft-dark), -3px -3px 6px var(--soft-light);
  --soft-inset-sm: inset 3px 3px 6px var(--soft-dark), inset -3px -3px 6px var(--soft-light);
}

.cm-auth-modal .cm-modal-backdrop {
  background: rgba(120, 130, 145, 0.35);
  backdrop-filter: blur(2px);
}

.cm-auth-dialog {
  width: min(400px, calc(100vw - 1.25rem));
  max-height: min(94vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  padding: 0;
  border-radius: 28px;
  background: var(--soft-bg, #e0e5ec);
  box-shadow: 12px 12px 28px rgba(163, 177, 198, 0.45), -10px -10px 24px rgba(255, 255, 255, 0.85);
}

.cm-auth-dialog.is-register {
  width: min(420px, calc(100vw - 1rem));
  max-height: min(96vh, 920px);
}

.cm-auth-soft {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.75rem 1.5rem 1.35rem;
  background: var(--soft-bg, #e0e5ec);
  color: var(--soft-text, #3d4a5c);
}

.cm-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;
}

.cm-auth-logo-ring {
  width: 92px;
  height: 92px;
  margin: 0.15rem auto 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft-bg, #e0e5ec);
  box-shadow: var(--soft-raised);
  flex: 0 0 auto;
}

.cm-auth-logo {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.cm-auth-hero {
  position: relative;
  flex: 0 0 auto;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
}

.cm-auth-hero h3 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: #2f3a4a;
  letter-spacing: -0.02em;
}

.cm-auth-sub {
  margin: 0.4rem 0 0;
  max-width: none;
  color: var(--soft-muted, #8b95a5);
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 500;
}

.cm-auth-x {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--soft-bg, #e0e5ec);
  color: #4a5568;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--soft-raised-sm);
}

.cm-auth-x:active {
  box-shadow: var(--soft-inset-sm);
}

.cm-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 1.15rem 0 0.35rem;
  padding: 0.3rem;
  background: var(--soft-bg, #e0e5ec);
  border-radius: 16px;
  box-shadow: var(--soft-inset-sm);
}

.cm-auth-tab {
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 0.65rem 0.45rem;
  font-weight: 800;
  color: var(--soft-muted, #8b95a5);
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.cm-auth-tab.is-active {
  background: var(--soft-bg, #e0e5ec);
  color: #2f3a4a;
  box-shadow: var(--soft-raised-sm);
}

.cm-auth-reg-block {
  display: grid;
  gap: 0.85rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.cm-auth-reg-block[hidden] {
  display: none !important;
}

.cm-field-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--soft-muted, #8b95a5);
  font-weight: 500;
}

.cm-auth-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  gap: 0;
}

.cm-auth-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0.85rem 0.15rem 0.25rem;
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.cm-auth-field {
  display: grid;
  gap: 0;
  margin: 0;
  min-width: 0;
}

.cm-auth-form label > span:first-child:not(.cm-sr-only),
.cm-auth-field > span:first-child:not(.cm-sr-only) {
  font-weight: 700;
  color: #2f3a4a;
  font-size: 0.88rem;
}

.cm-soft-input {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0.35rem 0.85rem;
  border-radius: 18px;
  background: var(--soft-bg, #e0e5ec);
  box-shadow: var(--soft-inset);
  border: 0;
}

.cm-soft-input:focus-within {
  box-shadow: var(--soft-inset), 0 0 0 2px rgba(61, 74, 92, 0.08);
}

.cm-soft-ico {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  color: #6b7585;
}

.cm-soft-ico svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cm-auth-form .cm-soft-input input,
.cm-auth-field .cm-soft-input input,
.cm-soft-input input {
  width: 100%;
  box-sizing: border-box;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.65rem 0;
  font-size: 0.95rem;
  line-height: 1.35;
  min-height: 44px;
  color: #2f3a4a;
  flex: 1;
}

.cm-auth-form .cm-soft-input input:focus,
.cm-auth-field .cm-soft-input input:focus,
.cm-soft-input input:focus {
  outline: none;
  box-shadow: none !important;
}

.cm-auth-form .cm-soft-input input::placeholder,
.cm-soft-input input::placeholder {
  color: #9aa3b2;
}

.cm-phone-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: visible;
  min-height: 54px;
}

.cm-phone-wrap:focus-within {
  border: 0;
}

.cm-phone-cc {
  display: grid;
  place-items: center;
  padding: 0 0.35rem 0 0.15rem;
  background: transparent;
  color: #2f3a4a;
  font-weight: 800;
  font-size: 0.92rem;
  border: 0;
  flex: 0 0 auto;
  direction: ltr;
}

.cm-phone-cc-select {
  flex: 0 0 auto;
  max-width: 9.5rem;
  min-width: 6.8rem;
  height: 42px;
  margin: 0;
  padding: 0 1.55rem 0 0.35rem;
  border: 0;
  border-radius: 10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232f3a4a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
      no-repeat right 0.35rem center / 10px,
    rgba(15, 23, 42, 0.04);
  color: #2f3a4a;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.2;
  direction: ltr;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.cm-phone-cc-select:focus {
  outline: none;
  background-color: rgba(0, 108, 53, 0.08);
}

.cm-phone-wrap input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  min-height: 44px;
  flex: 1;
  min-width: 0;
}

.cm-pass-wrap {
  padding-inline-end: 0.45rem;
}

.cm-pass-toggle {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--soft-bg, #e0e5ec);
  color: #5a6578;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
  box-shadow: var(--soft-raised-sm);
}

.cm-pass-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cm-pass-toggle:active,
.cm-pass-toggle.is-on {
  box-shadow: var(--soft-inset-sm);
}

.cm-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cm-auth-row .cm-forgot {
  margin-inline-start: auto;
  font-size: 0.84rem;
  font-weight: 600;
  color: #6b7585;
}

.cm-auth-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--soft-muted, #8b95a5);
  line-height: 1.5;
  text-align: center;
}

.cm-auth-submit {
  width: 100%;
  margin-top: 0.15rem;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: var(--soft-bg, #e0e5ec);
  color: #2f3a4a;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--soft-raised);
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}

.cm-auth-submit:hover {
  color: #1e2836;
}

.cm-auth-submit:active {
  box-shadow: var(--soft-inset);
  transform: translateY(1px);
}

.cm-auth-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0;
  color: var(--soft-muted, #8b95a5);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cm-auth-or::before,
.cm-auth-or::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, #c5cad3, transparent);
}

.cm-check {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  flex-direction: row !important;
  font-size: 0.88rem !important;
  color: #5a6578 !important;
  cursor: pointer;
  user-select: none;
}

.cm-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.15rem !important;
  height: 1.15rem;
  margin: 0;
  border-radius: 6px;
  background: var(--soft-bg, #e0e5ec);
  box-shadow: var(--soft-inset-sm);
  flex: 0 0 auto;
  cursor: pointer;
  position: relative;
}

.cm-check input:checked {
  background: #3d4a5c;
  box-shadow: var(--soft-raised-sm);
}

.cm-check input:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  background: #e0e5ec;
  clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 18%, 80% 0, 38% 62%);
}

.cm-auth-dev,
.cm-site-foot {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: #8a9a90;
  letter-spacing: 0.01em;
}

.cm-site-foot {
  padding: 1rem 1rem max(1.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--cm-line);
  background: color-mix(in srgb, var(--cm-bg, #f3f7f4) 88%, #fff);
}

.cm-switch {
  text-align: center;
  margin: 0;
}

.cm-switch .cm-text-btn,
.cm-auth-row .cm-text-btn {
  border: 0;
  background: transparent;
  color: #5a6578;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem;
}

.cm-switch .cm-text-btn:hover,
.cm-auth-row .cm-text-btn:hover {
  color: #2f3a4a;
}

.cm-error {
  margin: 0;
  color: #b42318;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 560px) {
  .cm-auth-modal {
    padding: 0;
    align-items: end;
  }

  .cm-auth-dialog,
  .cm-auth-dialog.is-register {
    width: 100%;
    max-height: min(96dvh, 100%);
    border-radius: 28px 28px 0 0;
  }

  .cm-auth-soft {
    padding: 1.5rem 1.2rem max(1.1rem, env(safe-area-inset-bottom));
  }

  .cm-auth-logo-ring {
    width: 84px;
    height: 84px;
    margin-bottom: 0.9rem;
  }

  .cm-auth-logo {
    width: 58px;
    height: 58px;
  }

  .cm-auth-hero h3 {
    font-size: 1.4rem;
  }

  .cm-auth-form .cm-soft-input input,
  .cm-soft-input input,
  .cm-pass-wrap input,
  .cm-phone-wrap input {
    font-size: 16px;
  }
}

.cm-modal-wide {
  width: min(560px, 100%);
}

.cm-modal-messages {
  width: min(920px, 100%);
  height: min(720px, 94vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 108, 53, 0.12);
  box-shadow: 0 28px 70px rgba(0, 60, 30, 0.22);
}

.cm-msg-head {
  background: linear-gradient(180deg, #f3faf6, #fff);
  gap: 0.5rem;
}

.cm-msg-head h3 {
  flex: 1;
  text-align: center;
  color: var(--cm-green);
  font-weight: 800;
}

.cm-msg-back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--cm-line);
  border-radius: 10px;
  background: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--cm-green);
  flex: 0 0 auto;
  display: none;
}

.cm-msg-back:hover {
  background: rgba(10, 138, 72, 0.08);
}

.cm-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--cm-line);
}

.cm-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cm-x {
  width: 34px;
  height: 34px;
  border: 1px solid var(--cm-line);
  border-radius: 10px;
  background: var(--cm-bg);
  cursor: pointer;
  font-size: 1.2rem;
}

.cm-form {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem;
}

.cm-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--cm-muted);
}

.cm-form input,
.cm-form textarea {
  width: 100%;
  border: 1px solid var(--cm-line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.cm-error {
  color: #b42318;
  font-size: 0.88rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #fdecea;
  font-weight: 700;
  line-height: 1.45;
}

.cm-switch {
  text-align: center;
  margin: 0;
}

.cm-text-btn {
  border: none;
  background: none;
  color: var(--cm-green);
  font-weight: 700;
  cursor: pointer;
}

.cm-file-label {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.cm-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cm-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.cm-comments {
  max-height: 360px;
  overflow: auto;
  padding: 0.85rem 1.1rem;
  display: grid;
  gap: 0.75rem;
}

.cm-comment {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.5rem;
}

.cm-comment p {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cm-comment-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem 1.1rem;
  border-top: 1px solid var(--cm-line);
}

.cm-comment-form input {
  flex: 1;
  border: 1px solid var(--cm-line);
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
}

.cm-msg-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  background: #fff;
}

.cm-inbox {
  border-inline-end: 1px solid var(--cm-line);
  overflow: auto;
  background: #fafcfb;
  padding: 0.35rem;
}

.cm-inbox button,
.cm-inbox .cm-inbox-row {
  width: 100%;
  text-align: inherit;
  border: none;
  background: transparent;
  padding: 0.75rem 0.7rem;
  border-radius: 14px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.15rem;
}

.cm-inbox button.is-active,
.cm-inbox .cm-inbox-row.is-active {
  background: rgba(10, 138, 72, 0.1);
}

.cm-inbox .cm-inbox-row.has-unread .cm-inbox-text strong {
  color: var(--cm-ink);
  font-weight: 800;
}

.cm-inbox-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--cm-muted);
}

.cm-inbox-empty span {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
  opacity: 0.7;
}

.cm-avatar-md {
  width: 48px;
  height: 48px;
  font-size: 1.05rem;
  border-radius: 50%;
}

.cm-thread-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #eef5f0;
}

.cm-thread {
  flex: 1;
  overflow: auto;
  padding: 0.95rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 168, 89, 0.06), transparent 42%),
    linear-gradient(180deg, #eef6f1, #e7f0ea);
  scroll-behavior: smooth;
}

.cm-thread-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--cm-line);
  background: #fff;
  flex: 0 0 auto;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.cm-thread-peer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.cm-thread-peer-meta {
  min-width: 0;
}

.cm-thread-peer strong {
  display: block;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-thread-status {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: var(--cm-green-mid);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.cm-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cm-messenger);
  box-shadow: 0 0 0 3px rgba(0, 168, 89, 0.18);
}

.cm-bubble {
  max-width: 78%;
  padding: 0.55rem 0.85rem;
  border-radius: 18px;
  font-size: 0.93rem;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  animation: cm-bubble-in 0.22s ease both;
  position: relative;
  word-break: break-word;
}

@keyframes cm-bubble-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cm-bubble-me {
  align-self: flex-end;
  background: linear-gradient(145deg, var(--cm-messenger), var(--cm-messenger-dark));
  color: #fff;
  border-bottom-left-radius: 5px;
}

.cm-bubble-me::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-end: -5px;
  width: 10px;
  height: 14px;
  background: var(--cm-messenger-dark);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.cm-bubble-them {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom-right-radius: 5px;
}

.cm-bubble-them::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: -5px;
  width: 10px;
  height: 14px;
  background: #fff;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.cm-msg-composer {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  margin-top: auto;
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--cm-line);
}

.cm-msg-composer-inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #f0f4f1;
  border-radius: 999px;
  padding: 0.25rem 0.3rem 0.25rem 0.85rem;
  border: 1px solid transparent;
}

.cm-msg-composer-inner:focus-within {
  border-color: rgba(0, 168, 89, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 168, 89, 0.1);
}

.cm-msg-composer-inner input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 0.55rem 0.2rem;
  font-size: 0.95rem;
  min-width: 0;
}

.cm-msg-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--cm-messenger), var(--cm-messenger-dark));
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(0, 108, 53, 0.28);
}

.cm-msg-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.cm-msg-send:hover {
  filter: brightness(1.05);
}

.cm-msg-empty-state {
  margin: auto;
  text-align: center;
  padding: 2rem 1.25rem;
  color: var(--cm-muted);
  max-width: 280px;
}

.cm-msg-empty-state[hidden] {
  display: none !important;
}

.cm-msg-empty-ico {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 0.55rem;
  opacity: 0.75;
}

.cm-msg-empty-state p {
  margin: 0;
  line-height: 1.55;
  font-size: 0.92rem;
}

.cm-inbox button .cm-inbox-text,
.cm-inbox .cm-inbox-text {
  min-width: 0;
}

.cm-inbox .cm-inbox-text strong {
  display: block;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-inbox .cm-inbox-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--cm-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.12rem;
}

.cm-inbox-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--cm-messenger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

.cm-pad {
  padding: 1rem;
}

.cm-empty {
  text-align: center;
  color: var(--cm-muted);
  padding: 2rem 1rem;
}

/* —— App shell / icons —— */
.cm-app {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.cm-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cm-line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  color: var(--cm-ink);
}

.cm-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cm-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.cm-btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.cm-guest-actions {
  display: inline-flex;
  gap: 0.35rem;
}

.cm-live-bar {
  width: min(1180px, calc(100% - 1rem));
  margin: 0.55rem auto 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(90deg, #006c35, #0a8a48);
  color: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 108, 53, 0.28);
  animation: cm-slide-in 0.35s ease;
}

.cm-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: cm-pulse 1.4s infinite;
}

.cm-live-bar button {
  margin-inline-start: auto;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

@keyframes cm-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@keyframes cm-slide-in {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cm-mobile-search {
  display: none;
  margin-bottom: 0.65rem;
}

.cm-mobile-search input {
  width: 100%;
  border: 1px solid var(--cm-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.65rem 1rem;
}

.cm-tabbar {
  display: none;
}

.cm-post-media video {
  width: 100%;
  max-height: 420px;
  border-radius: 12px;
  background: #000;
  display: block;
}

.cm-post-actions button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
  margin-inline-end: 0.2rem;
}

.cm-media-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cm-chip-file {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--cm-line);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  background: var(--cm-bg);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cm-ink);
}

.cm-chip-file svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.cm-sheet[hidden],
.cm-install[hidden] {
  display: none !important;
}

.cm-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.cm-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 14, 0.45);
}

.cm-sheet-panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: 78vh;
  background: #fff;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: cm-sheet-up 0.28s ease;
}

@keyframes cm-sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.cm-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--cm-line);
}

.cm-sheet-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.cm-notify-list {
  overflow: auto;
  padding: 0.35rem 0.45rem 0.7rem;
  display: grid;
  gap: 0;
  max-height: min(62vh, 480px);
  background: #fff;
}

.cm-notify-sheet .cm-notify-panel {
  max-height: min(82vh, 640px);
  width: min(400px, 100%);
  inset-inline: auto;
  inset-inline-end: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: auto;
  right: max(0.75rem, env(safe-area-inset-right));
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  background: #fff;
}

html[dir="rtl"] .cm-notify-sheet .cm-notify-panel {
  right: auto;
  left: max(0.75rem, env(safe-area-inset-left));
}

.cm-notify-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid #eef0f2;
}

.cm-notify-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #050505;
}

.cm-notify-sub {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #65676b;
}

.cm-notify-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 0.55rem;
  border-radius: 10px;
  border: none;
  background: #fff;
  text-align: start;
  cursor: pointer;
  transition: background 0.12s ease;
  position: relative;
}

.cm-notify-item:hover {
  background: #f2f3f5;
}

.cm-notify-item.is-unread {
  background: #e7f3ff;
}

.cm-notify-item.is-unread:hover {
  background: #dcebff;
}

.cm-notify-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.cm-notify-ico {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e4e6eb;
  font-size: 1.2rem;
}

.cm-notify-item.is-unread .cm-notify-ico {
  background: #d8e7fb;
}

.cm-notify-dot {
  position: absolute;
  inset-inline-start: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cm-fb-blue);
  box-shadow: 0 0 0 2px #fff;
}

.cm-notify-body {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding-top: 0.1rem;
}

.cm-notify-body strong {
  font-size: 0.9rem;
  color: #050505;
  line-height: 1.35;
  font-weight: 700;
}

.cm-notify-body p {
  margin: 0;
  font-size: 0.84rem;
  color: #65676b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cm-notify-body time {
  font-size: 0.75rem;
  color: var(--cm-fb-blue);
  font-weight: 600;
}

.cm-notify-item:not(.is-unread) .cm-notify-body time {
  color: #65676b;
  font-weight: 500;
}

.cm-notify-empty {
  text-align: center;
  padding: 2.2rem 1rem;
  color: #65676b;
}

.cm-notify-empty-ico {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.cm-inbox-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.7rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: start;
  cursor: pointer;
}

.cm-inbox-row:hover,
.cm-inbox-row.is-active {
  background: rgba(10, 138, 72, 0.1);
}

.cm-inbox-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #eef2f0;
  color: #4d6356;
  white-space: nowrap;
}

.cm-inbox-tag.is-req {
  background: #ffe8c8;
  color: #8a4b00;
}

.cm-chat-gate {
  margin: 0.75rem 1rem 1rem;
  padding: 1.1rem 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #f4faf6, #fff);
  border: 1px solid rgba(10, 108, 53, 0.14);
  text-align: center;
}

.cm-chat-gate-text {
  margin: 0 0 0.85rem;
  color: #234332;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cm-chat-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

@media (max-width: 980px) {
  .cm-notify-sheet .cm-notify-panel {
    width: 100%;
    inset: auto 0 0 0;
    left: 0;
    right: 0;
    border-radius: 22px 22px 0 0;
    max-height: 78vh;
  }
}

.cm-install {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(10, 138, 72, 0.35), transparent 60%),
    rgba(4, 16, 10, 0.72);
  backdrop-filter: blur(10px);
}

.cm-install-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 154, 108, 0.35), transparent 70%);
  top: 12%;
  animation: cm-float 4s ease-in-out infinite;
}

@keyframes cm-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

.cm-install-card {
  position: relative;
  width: min(420px, 100%);
  background: linear-gradient(180deg, #0b1f15, #082016 40%, #06140e);
  color: #f4faf6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 1.35rem 1.2rem 1.2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  text-align: center;
  animation: cm-sheet-up 0.4s ease;
}

.cm-install-skip {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #d7e8dc;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.cm-install-logo {
  width: 92px;
  height: 92px;
  margin: 0.4rem auto 0.8rem;
  border-radius: 24px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.cm-install-logo img {
  width: 72px;
  height: auto;
}

.cm-install-eyebrow {
  margin: 0;
  color: #c49a6c;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.cm-install-card h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.35;
}

.cm-install-sub {
  margin: 0;
  color: rgba(244, 250, 246, 0.78);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cm-install-perks {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.45rem;
  text-align: start;
}

.cm-install-perks li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.cm-install-cta {
  margin-top: 0.35rem;
}

.cm-ios-steps {
  text-align: start;
  margin: 0.75rem 0;
  font-size: 0.86rem;
  color: rgba(244, 250, 246, 0.85);
}

.cm-ios-steps ol {
  margin: 0.4rem 0 0;
  padding-inline-start: 1.2rem;
}

.cm-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--cm-line);
  font-size: 0.88rem;
}

.cm-mini-stats h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .cm-app {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  .cm-layout {
    grid-template-columns: 1fr;
    width: min(100%, calc(100% - 0.75rem));
    margin-top: 0.65rem;
  }

  .cm-desktop-only,
  .cm-col-left,
  .cm-col-right,
  .cm-search--desktop,
  .cm-me-name,
  .cm-link-quiet {
    display: none !important;
  }

  .cm-top-inner {
    min-height: 56px;
    width: min(100%, calc(100% - 0.75rem));
    gap: 0.45rem;
  }

  .cm-brand span {
    font-size: 0.82rem;
  }

  .cm-brand img {
    height: 34px;
  }

  .cm-mobile-search.is-open {
    display: block;
  }

  .cm-card,
  .cm-post {
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(15, 40, 28, 0.06);
  }

  .cm-composer {
    position: sticky;
    top: 56px;
    z-index: 20;
  }

  .cm-post-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .cm-post-actions button {
    font-size: 0;
    gap: 0;
  }

  .cm-post-actions button svg {
    margin: 0;
    width: 22px;
    height: 22px;
  }

  .cm-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--cm-line);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  }

  .cm-tab {
    border: none;
    background: transparent;
    display: grid;
    place-items: center;
    gap: 0.1rem;
    color: var(--cm-muted);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.25rem;
  }

  .cm-tab svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .cm-tab.is-active {
    color: var(--cm-green);
  }

  .cm-tab-fab {
    transform: translateY(-10px);
  }

  .cm-fab-plus {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(145deg, #0a8a48, #006c35);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(0, 108, 53, 0.35);
  }

  .cm-fab-plus svg {
    stroke: #fff;
    width: 24px;
    height: 24px;
  }

  .cm-modal-dialog,
  .cm-modal-wide,
  .cm-modal-messages {
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    margin-top: auto;
    max-height: 94vh;
  }

  .cm-modal-messages {
    height: min(94vh, 940px);
    border-radius: 16px 16px 0 0;
  }

  .cm-modal {
    place-items: end center;
    padding: 0;
  }

  .cm-msg-layout {
    grid-template-columns: 1fr;
  }

  .cm-msg-back {
    display: grid;
    place-items: center;
  }

  #modal-messages:not(.is-thread-open) .cm-thread-wrap {
    display: none;
  }

  #modal-messages.is-thread-open .cm-inbox {
    display: none;
  }

  #modal-messages:not(.is-thread-open) .cm-msg-back {
    visibility: hidden;
    pointer-events: none;
  }

  #modal-messages.is-thread-open .cm-msg-head h3 {
    text-align: start;
  }

  /* Professional mobile shell polish */
  .cm-top {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 18px rgba(15, 40, 28, 0.05);
  }

  .cm-top-actions {
    gap: 0.3rem;
  }

  .cm-guest-actions .cm-btn {
    min-height: 36px;
    padding: 0.35rem 0.7rem;
  }

  .cm-mobile-search {
    display: block;
    margin: 0 0 0.75rem;
  }

  .cm-mobile-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--cm-line);
    background: #fff;
    border-radius: 14px;
    padding: 0.65rem 0.95rem;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(15, 40, 28, 0.04);
  }

  .cm-composer {
    border-radius: 18px;
    border: 1px solid var(--cm-line);
    box-shadow: 0 8px 22px rgba(15, 40, 28, 0.06);
  }

  .cm-composer-trigger {
    min-height: 44px;
    font-size: 0.92rem;
  }

  .cm-feed {
    display: grid;
    gap: 0.75rem;
  }

  .cm-post {
    padding: 0.85rem;
  }

  .cm-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.1rem;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 28px rgba(15, 40, 28, 0.08);
  }

  .cm-tab {
    min-height: 52px;
    border-radius: 12px;
  }

  .cm-tab.is-active {
    color: var(--cm-green);
    background: rgba(0, 108, 53, 0.08);
  }

  .cm-tab span {
    font-size: 0.64rem;
    letter-spacing: 0;
  }

  .cm-sheet-panel {
    border-radius: 20px 20px 0 0;
    max-height: min(88svh, 720px);
  }

  .cm-live-bar {
    width: min(100%, calc(100% - 0.75rem));
    border-radius: 14px;
    font-size: 0.8rem;
  }

  @media (max-width: 420px) {
    .cm-brand span {
      display: none;
    }

    .cm-guest-actions .cm-btn-ghost {
      display: none;
    }
  }
}

@supports (padding: max(0px)) {
  .cm-top {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* —— Guest / member chrome —— */
body.is-guest .cm-composer-row {
  opacity: 0.72;
  pointer-events: none;
}

body.is-guest .cm-composer {
  position: relative;
}

body.is-guest #cm-composer-lock {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(0, 108, 53, 0.08), rgba(0, 132, 255, 0.06));
  border: 1px dashed rgba(0, 108, 53, 0.25);
  font-weight: 700;
  color: var(--cm-ink);
}

body.is-member #cm-composer-lock,
body.is-member #cm-guest-welcome,
body.is-member #cm-guest-actions,
body.is-member #cm-side-cta {
  display: none !important;
}

body.is-guest #cm-guest-welcome {
  display: block;
}

.cm-guest-welcome {
  display: none;
  margin-bottom: 0.85rem;
  border-radius: var(--cm-radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 108, 53, 0.92), rgba(10, 138, 72, 0.88)),
    url("../img/logo.png") right -20px center / 140px no-repeat;
  color: #fff;
  box-shadow: var(--cm-shadow);
}

.cm-guest-welcome-inner {
  padding: 1.25rem 1.2rem;
}

.cm-guest-welcome h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 800;
}

.cm-guest-welcome p {
  margin: 0 0 0.85rem;
  opacity: 0.92;
  line-height: 1.55;
  font-size: 0.92rem;
}

.cm-guest-welcome .cm-btn-primary {
  background: #fff;
  color: var(--cm-green);
}

body.is-member .cm-profile-card {
  box-shadow: 0 14px 36px rgba(0, 80, 40, 0.12);
}

body.is-member .cm-avatar-btn {
  border-color: rgba(10, 138, 72, 0.35);
  box-shadow: 0 4px 14px rgba(0, 108, 53, 0.12);
}

.cm-tab {
  position: relative;
}

.cm-tab-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 18%;
  min-width: 16px;
  height: 16px;
  font-size: 0.62rem;
}

.cm-post-media video {
  width: 100%;
  max-height: 420px;
  border-radius: 12px;
  background: #000;
  cursor: pointer;
}

/* —— Social profile modal —— */
.cm-modal-profile {
  width: min(520px, 100%);
  overflow: hidden;
}

.cm-social-profile {
  position: relative;
}

.cm-social-cover {
  height: 120px;
  background:
    linear-gradient(125deg, #003d1f 0%, #006c35 45%, #0a8a48 72%, #b88955 100%);
}

.cm-social-identity {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  padding: 0 1.1rem 0.85rem;
  margin-top: -42px;
}

.cm-avatar-xl {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: linear-gradient(145deg, #0a8a48, #004d26);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.7rem;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.cm-avatar-xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cm-social-meta {
  min-width: 0;
  padding-bottom: 0.2rem;
}

.cm-social-meta h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.cm-social-meta .cm-muted {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
}

.cm-modal-profile {
  width: min(480px, 100%);
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cm-modal-profile.is-peek,
.cm-modal-profile.is-own {
  max-height: min(94vh, 860px);
}

.cm-modal-profile #cm-profile-peek,
.cm-modal-profile #cm-social-profile,
.cm-modal-profile #cm-profile-form {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cm-modal-profile #cm-profile-form[hidden],
.cm-modal-profile #cm-social-profile[hidden],
.cm-modal-profile #cm-profile-peek[hidden],
#cm-page-profile[hidden] {
  display: none !important;
}

#cm-profile-peek .cm-social-peek {
  text-align: center;
  padding: 0 0 1.15rem;
}

#cm-profile-peek .cm-peek-cover {
  height: 140px;
  border-radius: 0;
  margin: 0;
}

#cm-profile-peek .cm-peek-identity {
  padding: 0 1.15rem;
  margin-top: -52px;
}

#cm-profile-peek .cm-peek-avatar,
#cm-profile-peek .cm-social-peek .cm-avatar-xl {
  width: 104px;
  height: 104px;
  font-size: 2.1rem;
  margin: 0 auto 0.7rem;
  border-width: 5px;
  box-shadow: 0 10px 28px rgba(0, 60, 30, 0.2);
}

#cm-profile-peek .cm-social-peek h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
}

#cm-profile-peek .cm-social-stats {
  display: inline-flex;
  gap: 1rem;
  margin: 0.35rem 0 0.85rem;
  font-weight: 600;
  color: var(--cm-muted);
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #f3f7f4;
}

#cm-profile-peek .cm-social-stats strong {
  color: var(--cm-green);
  font-weight: 800;
}

#cm-profile-peek .cm-peek-bio-block {
  text-align: start;
  margin: 0 1.15rem 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbf8, #fff);
  border: 1px solid var(--cm-line);
}

#cm-profile-peek .cm-peek-bio-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cm-green);
  font-weight: 800;
}

#cm-profile-peek .cm-peek-bio {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  font-size: 0.95rem;
  color: var(--cm-ink);
}

#cm-profile-peek .cm-peek-cta {
  padding: 0 1.15rem 0.35rem;
}

#cm-profile-peek .cm-peek-cta .cm-btn {
  min-height: 48px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 108, 53, 0.22);
}

/* —— Lightbox —— */
.cm-lightbox[hidden] {
  display: none !important;
}

.cm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, 0.94);
  display: grid;
  place-items: center;
  padding: 0;
  touch-action: manipulation;
}

.cm-lightbox-stage {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top, 0.5rem) 0.5rem env(safe-area-inset-bottom, 0.5rem);
}

.cm-lightbox-stage img,
.cm-lightbox-stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  touch-action: manipulation;
}

.cm-lightbox-close,
.cm-lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  z-index: 2;
  touch-action: manipulation;
}

.cm-lightbox-close {
  top: max(0.75rem, env(safe-area-inset-top));
  inset-inline-end: max(0.75rem, env(safe-area-inset-right));
}

.cm-lightbox-prev {
  inset-inline-start: max(0.5rem, env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
}

.cm-lightbox-next {
  inset-inline-end: max(0.5rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
}

.cm-lightbox-nav[hidden] {
  display: none !important;
}

.cm-lightbox-close:hover,
.cm-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 980px) {
  .cm-guest-welcome-inner {
    padding: 1.05rem 1rem;
  }

  .cm-social-cover {
    height: 100px;
  }

  #cm-profile-peek .cm-peek-cover {
    height: 120px;
  }

  .cm-lightbox-nav {
    width: 42px;
    height: 42px;
  }

  .cm-lightbox-stage {
    padding: 3.5rem 0.35rem 1rem;
  }
}

/* ===== Facebook-style shell (v9) ===== */
:root {
  --cm-fb-bg: #f0f2f5;
  --cm-fb-text: #050505;
  --cm-fb-muted: #65676b;
  --cm-fb-hover: #f2f2f2;
  --cm-fb-line: #ced0d4;
  --cm-fb-card: #ffffff;
  --cm-like: #1877f2;
  --cm-love: #f33e58;
}

html,
body.cm-app {
  background: var(--cm-fb-bg);
}

.cm-top {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border-bottom: 0;
}

.cm-top-inner {
  width: min(100%, 1920px);
  padding-inline: 1rem;
  min-height: 56px;
}

.cm-search {
  position: relative;
  max-width: 240px;
}

.cm-search-ico {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #65676b;
  stroke-width: 2;
  pointer-events: none;
}

.cm-search input {
  padding-inline-start: 2.1rem;
  background: var(--cm-fb-bg);
  border: 0;
  height: 40px;
}

.cm-top-nav {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  margin-inline: auto;
  height: 56px;
}

.cm-top-nav-btn {
  width: 112px;
  border: none;
  background: transparent;
  color: var(--cm-fb-muted);
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

.cm-top-nav-btn svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.cm-top-nav-btn.is-active {
  color: var(--cm-green);
  box-shadow: inset 0 -3px 0 var(--cm-green);
  border-radius: 0;
}

.cm-top-nav-btn:hover:not(.is-active) {
  background: var(--cm-fb-hover);
}

.cm-layout {
  width: min(1260px, calc(100% - 1rem));
  margin: 0.75rem auto 2rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 680px) 300px;
  justify-content: center;
  gap: 1rem;
  align-items: start;
}

.cm-col-left,
.cm-col-right {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow: auto;
}

.cm-col-feed {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
}

.cm-card,
.cm-post,
.cm-composer {
  border-radius: 8px;
  border: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cm-side-me {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: start;
  margin-bottom: 0.35rem;
}

.cm-side-me:hover {
  background: rgba(0, 0, 0, 0.04);
}

.cm-side-me-text {
  display: grid;
  min-width: 0;
}

.cm-side-me-text strong {
  font-size: 0.95rem;
}

.cm-side-me-text small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-side-nav {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.cm-side-nav a,
.cm-side-nav button {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  color: var(--cm-ink);
  text-align: start;
}

.cm-side-nav a:hover,
.cm-side-nav button:hover,
.cm-side-nav a.is-active {
  background: rgba(0, 108, 53, 0.08);
}

.cm-side-ico {
  width: 28px;
  text-align: center;
}

.cm-composer-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--cm-line);
  margin-top: 0.75rem;
  padding-top: 0.35rem;
}

.cm-composer-tool {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.4rem;
  border-radius: 8px;
  font-weight: 700;
  color: var(--cm-fb-muted);
  cursor: pointer;
}

.cm-composer-tool:hover {
  background: var(--cm-fb-hover);
}

.cm-post {
  padding: 0.75rem 0 0.35rem;
}

.cm-post-head {
  padding: 0 0.85rem;
  align-items: flex-start;
}

.cm-post-head-main {
  flex: 1;
  min-width: 0;
}

.cm-post-more {
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--cm-fb-muted);
  font-size: 1.2rem;
  line-height: 1;
}

.cm-post-more:hover {
  background: var(--cm-fb-hover);
}

.cm-post-menu {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 2.6rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  min-width: 180px;
  z-index: 5;
  overflow: hidden;
}

.cm-post-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  padding: 0.7rem 0.9rem;
  text-align: start;
  cursor: pointer;
  font-weight: 700;
}

.cm-post-menu button:hover {
  background: var(--cm-fb-hover);
}

.cm-post-body {
  padding: 0 0.85rem;
}

.cm-img-grid {
  margin: 0.55rem 0 0.35rem;
  display: grid;
  gap: 2px;
  background: #fff;
  overflow: hidden;
}

.cm-img-grid img,
.cm-img-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  background: #000;
}

.cm-img-grid.n1 {
  grid-template-columns: 1fr;
}

.cm-img-grid.n1 img,
.cm-img-grid.n1 video {
  max-height: 520px;
  object-fit: contain;
  background: #000;
}

.cm-img-grid.n2 {
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
}

.cm-img-grid.n2 > * {
  min-height: 280px;
}

.cm-img-grid.n3 {
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 360px;
}

.cm-img-grid.n3 > :first-child {
  grid-row: 1 / span 2;
  min-height: 360px;
}

.cm-img-grid.n4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 360px;
}

.cm-img-grid.n4 > * {
  min-height: 180px;
}

.cm-img-grid.n5 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 220px 140px 140px;
}

.cm-img-grid.n5 > :nth-child(1) {
  grid-column: 1;
  grid-row: 1 / span 1;
}

.cm-img-grid.n5 > :nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.cm-img-more {
  position: relative;
}

.cm-img-more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.cm-share-embed {
  margin: 0.55rem 0.85rem 0.35rem;
  border: 1px solid var(--cm-fb-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.cm-share-embed .cm-post-head {
  padding: 0.65rem 0.75rem 0.35rem;
}

.cm-share-embed .cm-post-body {
  padding: 0 0.75rem 0.55rem;
  font-size: 0.9rem;
}

.cm-post-stats {
  padding: 0.35rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cm-react-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--cm-fb-muted);
}

.cm-react-icons {
  display: inline-flex;
}

.cm-react-icons span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: #fff;
  box-shadow: 0 0 0 1px #fff;
  margin-inline-end: -4px;
}

.cm-post-actions {
  margin: 0 0.6rem;
  border-top: 1px solid var(--cm-line);
  border-bottom: 1px solid var(--cm-line);
}

.cm-post-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.cm-post-actions button.is-on[data-react="like"],
.cm-post-actions button.is-like {
  color: var(--cm-like);
}

.cm-post-actions button.is-love {
  color: var(--cm-love);
}

.cm-react-pop {
  position: fixed;
  z-index: 120;
  display: flex;
  gap: 0.2rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: cm-react-in 0.16s ease;
}

.cm-react-pop[hidden] {
  display: none !important;
}

.cm-react-pop button {
  border: 0;
  background: transparent;
  font-size: 1.7rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.cm-react-pop button:hover {
  transform: scale(1.35) translateY(-6px);
}

@keyframes cm-react-in {
  from { transform: scale(0.7) translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.cm-share-menu {
  position: fixed;
  z-index: 120;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  min-width: 230px;
  overflow: hidden;
  padding: 0.35rem 0;
}

.cm-share-menu[hidden] {
  display: none !important;
}

.cm-share-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  padding: 0.7rem 1rem;
  text-align: start;
  cursor: pointer;
  font-weight: 700;
}

.cm-share-menu button:hover {
  background: var(--cm-fb-hover);
}

.cm-inline-comments {
  padding: 0.45rem 0.85rem 0.7rem;
}

.cm-comment {
  display: flex;
  gap: 0.5rem;
  margin: 0.45rem 0;
}

.cm-comment-body {
  background: var(--cm-fb-bg);
  border-radius: 16px;
  padding: 0.45rem 0.7rem;
  min-width: 0;
}

.cm-comment-body p {
  margin: 0.15rem 0 0;
  white-space: pre-wrap;
}

.cm-comment-img {
  max-width: 180px;
  border-radius: 10px;
  display: block;
  margin-top: 0.35rem;
  cursor: zoom-in;
}

.cm-comment-meta {
  display: flex;
  gap: 0.65rem;
  padding: 0.1rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--cm-fb-muted);
}

.cm-comment-meta button {
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  color: var(--cm-fb-muted);
}

.cm-comment-replies {
  margin-inline-start: 2.4rem;
}

.cm-comment-form-inline {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.55rem;
  width: 100%;
}

.cm-comment-input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: var(--cm-fb-bg, #f0f2f5);
  border-radius: 999px;
  padding: 0.2rem 0.35rem 0.2rem 0.75rem;
}

html[dir="rtl"] .cm-comment-input-wrap {
  padding: 0.2rem 0.75rem 0.2rem 0.35rem;
}

.cm-comment-form-inline input[type="text"] {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0.55rem 0.2rem;
  min-width: 0;
  font-size: 0.92rem;
}

.cm-comment-form-inline input[type="text"]:focus {
  outline: none;
}

.cm-comment-tools {
  display: flex;
  gap: 0.05rem;
  flex: 0 0 auto;
}

.cm-comment-tools button,
.cm-comment-tools label,
.cm-comment-img-btn {
  border: 0;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.cm-comment-form-inline > .cm-comment-send,
button.cm-comment-send {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  border: 0 !important;
  background: #006c35 !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1;
  border-radius: 999px !important;
  padding: 0 0.95rem !important;
  min-height: 38px !important;
  height: 38px !important;
  width: auto !important;
  min-width: 4.5rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.cm-comment-send svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

html[dir="rtl"] .cm-comment-send svg {
  transform: scaleX(-1);
}

.cm-comment-send:hover {
  background: #005229 !important;
}

.cm-comment-send:active {
  transform: scale(0.97);
}

@media (max-width: 560px) {
  .cm-comment-send span {
    display: inline;
  }

  .cm-comment-form-inline > .cm-comment-send,
  button.cm-comment-send {
    min-width: 3.75rem;
    padding: 0 0.75rem !important;
  }
}

.cm-emoji-pop {
  position: fixed;
  z-index: 130;
  width: 280px;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 0.45rem;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.15rem;
}

.cm-emoji-pop[hidden] {
  display: none !important;
}

.cm-emoji-pop button {
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 6px;
}

.cm-emoji-pop button:hover {
  background: var(--cm-fb-hover);
}

.cm-online-list,
.cm-suggest {
  display: grid;
  gap: 0.2rem;
}

.cm-online-row,
.cm-suggest-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  width: 100%;
  padding: 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: start;
}

.cm-online-row:hover,
.cm-suggest-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

.cm-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #31a24c;
  box-shadow: 0 0 0 2px #fff;
  margin-inline-start: auto;
}

.cm-page-profile {
  position: fixed;
  inset: 0;
  z-index: 55;
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--cm-fb-bg);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cm-page-profile .cm-fb-profile {
  width: min(1080px, 100%);
  margin-inline: auto;
  padding-bottom: 2rem;
}

.cm-fb-profile {
  background: transparent;
}

.cm-prof-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.35rem 0.5rem;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.cm-prof-back {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #e4e6eb;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cm-prof-back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #050505;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[dir="rtl"] .cm-prof-back svg {
  transform: scaleX(-1);
}

.cm-prof-bar-meta {
  min-width: 0;
  display: grid;
}

.cm-prof-bar-meta strong {
  font-size: 1.02rem;
}

.cm-prof-bar-meta small {
  color: var(--cm-fb-muted);
  font-size: 0.78rem;
}

.cm-fb-cover {
  height: 320px;
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(125deg, #003d1f 0%, #006c35 45%, #0a8a48 72%, #b88955 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.cm-avatar-wrap {
  position: relative;
  z-index: 3;
  width: 168px;
  height: 168px;
  flex: 0 0 168px;
  grid-column: 1;
  justify-self: start;
}

.cm-cover-edit {
  position: absolute;
  inset-inline-end: 1rem;
  bottom: 1rem;
  border: 0;
  background: #fff;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 4;
}

.cm-online-badge {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #31a24c;
  border: 3px solid #fff;
  inset-inline-end: 10px;
  bottom: 12px;
}

.cm-intro-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  padding: 0.9rem 1rem;
  margin: 0.65rem 0 0;
}

.cm-intro-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.cm-intro-card p {
  margin: 0;
  line-height: 1.65;
  white-space: pre-wrap;
}

.cm-photo-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin-top: 0.65rem;
  background: #fff;
  padding: 0.45rem;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cm-photo-strip img,
.cm-photo-strip video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}

.cm-fb-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 1.35rem;
  row-gap: 0.85rem;
  padding: 0 1.75rem 1.2rem;
  margin-top: -88px;
  background: linear-gradient(180deg, transparent 0 88px, #fff 88px);
  border-radius: 0 0 8px 8px;
}

.cm-avatar-xxl {
  width: 168px;
  height: 168px;
  border: 5px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 3rem;
}

.cm-fb-meta {
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  padding-bottom: 0.55rem;
  padding-inline-start: 0.15rem;
  z-index: 1;
}

.cm-fb-meta h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
  color: #050505;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cm-fb-meta .cm-muted,
.cm-fb-counts {
  margin: 0.28rem 0 0;
  line-height: 1.4;
  color: var(--cm-fb-muted, #65676b);
}

.cm-fb-actions {
  grid-column: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  align-self: end;
  padding-bottom: 0.45rem;
  z-index: 1;
}

.cm-fb-actions .cm-btn {
  min-height: 40px;
}

.cm-fb-tabs {
  display: flex;
  gap: 0.2rem;
  background: #fff;
  margin-top: 0.5rem;
  border-radius: 8px;
  padding: 0 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cm-fb-tabs button {
  border: 0;
  background: transparent;
  padding: 0.95rem 1.1rem;
  font-weight: 800;
  color: var(--cm-fb-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.cm-fb-tabs button.is-active {
  color: var(--cm-green);
  border-bottom-color: var(--cm-green);
}

.cm-fb-tab-body {
  margin-top: 0.85rem;
  max-width: 680px;
}

.cm-fb-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.cm-fb-media img,
.cm-fb-media video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: zoom-in;
}

.cm-compose-dialog {
  width: min(500px, 100%);
}

.cm-compose-addbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--cm-line);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

.cm-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.4rem;
}

.cm-preview-grid .cm-prev-item {
  position: relative;
}

.cm-preview-grid img,
.cm-preview-grid video {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
}

.cm-prev-x {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
}

.cm-chat-dock {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  pointer-events: none;
}

.cm-chat-dock[hidden] {
  display: none !important;
}

.cm-chat-boxes,
.cm-chat-pills {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  pointer-events: auto;
}

.cm-chat-box {
  width: 328px;
  height: 430px;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cm-chat-box.is-min {
  height: 42px;
}

.cm-chat-box-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: var(--cm-green);
  color: #fff;
  cursor: pointer;
}

.cm-chat-box-head button {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.cm-chat-box-head .cm-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.cm-chat-box-thread {
  flex: 1;
  overflow: auto;
  padding: 0.6rem;
  background: #fff;
}

.cm-chat-box-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem;
  border-top: 1px solid var(--cm-line);
}

.cm-chat-box-form input {
  flex: 1;
  border: 0;
  background: var(--cm-fb-bg);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
}

.cm-chat-pill {
  border: 0;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem 0.25rem 0.25rem;
  cursor: pointer;
  font-weight: 700;
}

body.cm-layout-profile {
  overflow: hidden;
}

body.cm-layout-profile #cm-page-profile {
  display: block !important;
}

body.cm-layout-profile .cm-tabbar .cm-tab[data-tab="profile"] {
  color: var(--cm-green);
}

@media (max-width: 1100px) {
  .cm-layout {
    grid-template-columns: minmax(0, 680px) 280px;
  }
  .cm-col-left {
    display: none !important;
  }

  .cm-fb-identity {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.1rem;
  }

  .cm-fb-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 0.15rem;
  }
}

@media (max-width: 980px) {
  .cm-layout {
    grid-template-columns: 1fr;
  }
  .cm-col-right,
  .cm-top-nav,
  .cm-chat-dock {
    display: none !important;
  }
  body.cm-layout-profile #cm-page-profile {
    z-index: 55;
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  .cm-prof-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 52px;
    padding: 0.35rem 0.7rem;
    padding-top: max(0.35rem, env(safe-area-inset-top));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .cm-prof-back {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #e4e6eb;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .cm-prof-back svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #050505;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  html[dir="rtl"] .cm-prof-back svg {
    transform: scaleX(-1);
  }

  .cm-prof-bar-meta {
    min-width: 0;
    display: grid;
  }

  .cm-prof-bar-meta strong {
    font-size: 1.02rem;
    line-height: 1.2;
  }

  .cm-prof-bar-meta small {
    color: var(--cm-fb-muted);
    font-size: 0.75rem;
  }

  .cm-fb-cover {
    height: 200px;
    border-radius: 0;
  }

  .cm-avatar-wrap {
    width: 132px;
    height: 132px;
    flex-basis: 132px;
    grid-column: 1 / -1;
    justify-self: center;
  }

  .cm-avatar-xxl {
    width: 132px;
    height: 132px;
    border-width: 4px;
  }

  .cm-fb-identity {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    align-items: center;
    margin-top: -66px;
    padding: 0 0.9rem 0.95rem;
    background: linear-gradient(180deg, transparent 0 66px, #fff 66px);
    border-radius: 0;
    column-gap: 0;
    row-gap: 0.35rem;
  }

  .cm-fb-meta {
    grid-column: 1;
    text-align: center;
    padding: 0.45rem 0.35rem 0.25rem;
  }

  .cm-fb-meta h1 {
    font-size: 1.45rem;
  }

  .cm-fb-actions {
    grid-column: 1;
    justify-content: stretch;
    padding-bottom: 0.15rem;
  }

  .cm-fb-actions .cm-btn {
    flex: 1;
    border-radius: 8px;
  }

  .cm-fb-tabs {
    margin: 0.55rem 0.65rem 0;
    border-radius: 10px;
    justify-content: space-around;
  }

  .cm-fb-tab-body {
    margin: 0.65rem 0.65rem 1.2rem;
    max-width: none;
  }

  .cm-intro-card,
  .cm-photo-strip {
    margin-inline: 0.65rem;
  }

  .cm-photo-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .cm-fb-tabs button {
    flex: 1;
    padding: 0.8rem 0.4rem;
    font-size: 0.88rem;
  }
  .cm-img-grid.n3,
  .cm-img-grid.n4,
  .cm-img-grid.n5 {
    min-height: 240px;
  }
  .cm-post-actions button span {
    font-size: 0.78rem;
  }
}

/* —— Members directory —— */
.cm-page-members {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 56;
  overflow: auto;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(0, 108, 53, 0.14), transparent 50%),
    radial-gradient(90% 60% at 0% 100%, rgba(184, 137, 85, 0.12), transparent 45%),
    #f3f6f4;
  -webkit-overflow-scrolling: touch;
}

body.cm-layout-members .cm-page-members {
  display: block !important;
}

body.cm-layout-members {
  overflow: hidden;
}

body.cm-layout-members .cm-tabbar .cm-tab[data-tab="members"] {
  color: var(--cm-green, #006c35);
}

.cm-members-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 1rem 5.5rem;
}

.cm-members-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 56px;
  padding: 0.45rem 0.15rem;
  background: color-mix(in srgb, #f3f6f4 88%, transparent);
  backdrop-filter: blur(10px);
}

.cm-members-top-text {
  min-width: 0;
  flex: 1;
  display: grid;
}

.cm-members-top-text strong {
  font-size: 1.05rem;
}

.cm-members-top-text small {
  color: #6a7d71;
  font-size: 0.78rem;
}

.cm-members-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 1.35rem 1.25rem 1.2rem;
  margin: 0.35rem 0 1rem;
  color: #fff;
  background:
    linear-gradient(135deg, #003d1f 0%, #006c35 48%, #0a8a48 78%, #8f6a3d 120%);
  box-shadow: 0 16px 40px rgba(0, 60, 30, 0.22);
}

.cm-members-hero-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: -60px;
  top: -70px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
  pointer-events: none;
}

.cm-members-hero h2 {
  position: relative;
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
}

.cm-members-hero p {
  position: relative;
  margin: 0.45rem 0 0;
  max-width: 40rem;
  opacity: 0.92;
  line-height: 1.6;
  font-size: 0.92rem;
}

.cm-members-stats {
  position: relative;
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.cm-members-stats > div {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.55rem 0.9rem;
  min-width: 6.5rem;
  display: grid;
  gap: 0.1rem;
}

.cm-members-stats strong {
  font-size: 1.25rem;
  line-height: 1;
}

.cm-members-stats span {
  font-size: 0.75rem;
  opacity: 0.9;
}

.cm-members-toolbar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.cm-members-search {
  position: relative;
  display: flex;
  align-items: center;
}

.cm-members-search svg {
  position: absolute;
  inset-inline-start: 0.85rem;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #6a7d71;
  stroke-width: 2;
  pointer-events: none;
}

.cm-members-search input {
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 999px;
  min-height: 46px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  box-shadow: 0 1px 3px rgba(0, 40, 20, 0.08);
  font-size: 0.95rem;
}

html[dir="rtl"] .cm-members-search input {
  padding: 0.65rem 2.5rem 0.65rem 1rem;
}

.cm-members-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cm-members-filters button {
  border: 0;
  background: #fff;
  color: #4d6356;
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.cm-members-filters button.is-active {
  background: #006c35;
  color: #fff;
}

.cm-privacy-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cm-privacy-tips article {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 108, 53, 0.08);
  border-radius: 16px;
  padding: 0.85rem;
}

.cm-tip-ico {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e8f5ee;
  flex: 0 0 auto;
}

.cm-privacy-tips strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.cm-privacy-tips p {
  margin: 0;
  font-size: 0.78rem;
  color: #5a6b60;
  line-height: 1.45;
}

.cm-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.cm-member-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 1.1rem 1rem 0.95rem;
  box-shadow: 0 8px 28px rgba(8, 40, 24, 0.08);
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  text-align: center;
  overflow: hidden;
  animation: cm-member-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cm-member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(8, 40, 24, 0.14);
}

.cm-member-card:nth-child(2) { animation-delay: 0.04s; }
.cm-member-card:nth-child(3) { animation-delay: 0.08s; }
.cm-member-card:nth-child(4) { animation-delay: 0.12s; }
.cm-member-card:nth-child(5) { animation-delay: 0.16s; }
.cm-member-card:nth-child(6) { animation-delay: 0.2s; }

@keyframes cm-member-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cm-member-avatar-ring {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a8a48, #b88955);
  padding: 3px;
}

.cm-member-avatar-ring.is-online {
  box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.55);
  animation: cm-pulse-online 2s ease-out infinite;
}

@keyframes cm-pulse-online {
  0% { box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(49, 162, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(49, 162, 76, 0); }
}

.cm-member-avatar-ring .cm-avatar {
  width: 80px;
  height: 80px;
  border: 3px solid #fff;
  font-size: 1.6rem;
}

.cm-member-online-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #31a24c;
  border: 2px solid #fff;
  inset-inline-end: 4px;
  bottom: 6px;
}

.cm-member-card h3 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0b3d24;
}

.cm-member-handle {
  margin: 0;
  font-size: 0.78rem;
  color: #6a7d71;
}

.cm-member-bio {
  margin: 0;
  font-size: 0.82rem;
  color: #4d6356;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.cm-member-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.75rem;
  color: #6a7d71;
}

.cm-member-meta span {
  background: #eef5f0;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-weight: 700;
}

.cm-member-privacy-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #006c35;
  background: #e6f5ec;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.cm-member-privacy-tag.is-closed {
  color: #8a5a00;
  background: #fff4e0;
}

.cm-member-actions {
  display: flex;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.15rem;
}

.cm-member-actions .cm-btn {
  flex: 1;
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.cm-privacy-box {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f4faf6, #eef6f1);
  border: 1px solid #d7e8dc;
}

.cm-privacy-box h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #0b3d24;
}

.cm-privacy-box label {
  display: grid;
  gap: 0.3rem;
}

.cm-privacy-box select {
  border: 1px solid #d5e4da;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  min-height: 44px;
}

@media (max-width: 860px) {
  .cm-privacy-tips {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cm-members-shell {
    padding-inline: 0.75rem;
  }

  .cm-members-hero {
    border-radius: 18px;
    padding: 1.15rem 1rem;
  }

  .cm-members-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .cm-member-card {
    padding: 0.85rem 0.7rem 0.75rem;
    border-radius: 16px;
  }

  .cm-member-avatar-ring {
    width: 72px;
    height: 72px;
  }

  .cm-member-avatar-ring .cm-avatar {
    width: 66px;
    height: 66px;
  }

  .cm-member-actions {
    flex-direction: column;
  }
}

