/* Baldio Comunidade — paleta e letras do Baldio (Vollkorn + Hanken Grotesk), moldura "B" do POC. */
:root {
  --forest: #2D4C36; --forest-dark: #163521; --clay: #C18C5D; --clay-light: #e8b98a;
  --beige: #F2EFE9; --paper: #F9F8F6; --text: #1c1c18; --muted: #424842; --muted-light: #767c72;
  --border: rgba(45, 76, 54, .12); --danger: #9b2a24;
  --rail: 232px; --top: 61px;
}
body.cm { font-family: 'Hanken Grotesk', system-ui, sans-serif; background: var(--beige); color: var(--text); }
.cm h1, .cm h2, .cm h3, .cm .cm-serif { font-family: Vollkorn, Georgia, serif; color: var(--forest-dark); }
.cm a { color: var(--forest); }
.cm-muted { color: var(--muted-light); }
.cm-forest { color: var(--forest); }
.cm-kick { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--clay); }
.cm-side-t { font-size: 11px; font-weight: 700; color: var(--muted-light); text-transform: uppercase; letter-spacing: .08em; }

/* botões */
.cm-btn-forest { background: var(--forest); color: #fff; border: 0; }
.cm-btn-forest:hover, .cm-btn-forest:focus { background: var(--forest-dark); color: #fff; }
.cm-btn-soft { background: var(--beige); border: 1px solid var(--border); color: var(--text); }
.cm-btn-soft:hover { background: #e8e3d9; color: var(--text); }
.cm-btn-clay { background: var(--clay); color: #fff; border: 0; }
.cm-btn-clay:hover { background: #a8764a; color: #fff; }
.cm .form-control, .cm .form-select { border-color: var(--border); border-radius: 10px; }
.cm .form-control:focus, .cm .form-select:focus { border-color: var(--forest); box-shadow: 0 0 0 .2rem rgba(45, 76, 54, .15); }

/* menu lateral */
.cm-rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--forest-dark); color: #fffc; display: flex; flex-direction: column; padding: 14px 10px; z-index: 1040; transition: width .2s, transform .2s; overflow-y: auto; }
.cm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff !important; text-decoration: none; }
.cm-brand b, .cm-gate-logo b { width: 34px; height: 34px; border-radius: 10px; background: var(--clay); display: grid; place-items: center; font-family: Vollkorn, serif; font-size: 20px; color: var(--forest-dark); flex: none; }
.cm-brand b img, .cm-gate-logo b img { width: 24px; height: 24px; display: block; }
.cm-brand span { font-family: Vollkorn, serif; font-size: 18px; line-height: 1; }
.cm-brand small, .cm-gate-logo small { display: block; font-family: 'Hanken Grotesk', sans-serif; font-size: 11px; color: var(--clay-light); letter-spacing: .08em; text-transform: uppercase; }
.cm-it { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #fffb !important; text-decoration: none; font-weight: 500; white-space: nowrap; background: none; border: 0; width: 100%; text-align: left; }
.cm-it i { font-size: 18px; width: 20px; text-align: center; }
.cm-it:hover { background: #ffffff12; color: #fff !important; }
.cm-it.on { background: #ffffff1f; color: #fff !important; }
.cm-badge { margin-left: auto; background: var(--clay); color: var(--forest-dark); border-radius: 99px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
.cm-sep { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #fff6; padding: 16px 12px 6px; }
.cm-rail-foot { margin-top: auto; padding-top: 12px; }
body.cm-mini { --rail: 68px; }
body.cm-mini .cm-lbl, body.cm-mini .cm-brand span, body.cm-mini .cm-sep, body.cm-mini .cm-badge { display: none; }

/* coluna, topo, conteúdo */
.cm-col { margin-left: var(--rail); min-height: 100vh; transition: margin .2s; }
.cm-top { position: sticky; top: 0; z-index: 1030; background: #F2EFE9ee; backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr minmax(0, 560px) 1fr; align-items: center; gap: 12px; padding: 10px 20px; min-height: var(--top); }
.cm-top-l { display: flex; }
.cm-top-r { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.cm-search { position: relative; width: 100%; margin: 0; }
.cm-search input { border-radius: 12px !important; padding-left: 38px; background: #fff; }
.cm-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-light); }
.cm-main { padding: 22px 20px 90px; max-width: 1080px; margin: 0 auto; }
.cm-main-wide { padding: 0; }
.cm-flash { max-width: 1080px; margin: 14px auto 0; padding: 10px 16px; background: var(--forest-dark); color: #fff; border-radius: 12px; }

/* peças */
.cm-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.cm-card + .cm-card { margin-top: 12px; }
.cm-av { width: 36px; height: 36px; border-radius: 50%; background: var(--clay-light) center/cover; color: var(--forest-dark); display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.cm-av-sm { width: 28px; height: 28px; font-size: 11px; }
.cm-av-lg { width: 96px; height: 96px; font-size: 32px; border: 4px solid #fff; }
.cm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 99px; background: var(--beige); border: 1px solid var(--border); font-size: 13px; margin: 0 4px 6px 0; color: var(--text); text-decoration: none; }
.cm-chip.sel { background: var(--forest); color: #fff !important; border-color: var(--forest); }
a.cm-chip:hover, .cm-chip.pick:hover { border-color: var(--forest); }
.cm-chip.pick { cursor: pointer; user-select: none; }
.cm-chip button { border: 0; background: none; color: inherit; padding: 0; line-height: 1; }
.cm-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.cm-pill-rev { background: #C18C5D22; color: #8a5a2f; }
.cm-pill-new { background: #2D4C3618; color: var(--forest); }
.cm-pill-news { background: var(--forest-dark); color: #fff; }
.cm-pill-person { background: #e8b98a55; color: #6b4423; }
.cm-pill-pending { background: #b0302a18; color: var(--danger); }
.cm-bar { height: 6px; border-radius: 9px; background: #0001; overflow: hidden; }
.cm-bar i { display: block; height: 100%; background: var(--clay); }
.cm-thumb { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; background: var(--beige); }
.cm-cover { height: 180px; }
.cm-cover-sm { height: 90px; }
.cm-quote { background: var(--beige); border-radius: 12px; padding: 12px 14px; }
.cm-row-link { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit !important; }
.cm-row-link:last-child { border-bottom: 0; }
.cm-row-link:hover { background: var(--paper); }
.cm-actions-top { position: sticky; top: var(--top); z-index: 5; background: var(--beige); padding: 8px 0; }

/* início: feed centrado, painel colado à direita */
.cm-home { display: grid; grid-template-columns: 1fr 340px; min-height: calc(100vh - var(--top)); }
.cm-home .cm-feed { width: 100%; max-width: 680px; margin: 0 auto; padding: 22px 20px 90px; }
.cm-home .cm-aside { border-left: 1px solid var(--border); background: var(--paper); padding: 22px 18px; }
.cm-home .cm-aside > div { position: sticky; top: calc(var(--top) + 22px); }

/* mensagens (página) */
.cm-chat { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 140px); background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.cm-chat-list { border-right: 1px solid var(--border); overflow: auto; }
.cm-chat-list a { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit !important; }
.cm-chat-list a.on { background: var(--beige); }
.cm-thread { display: flex; flex-direction: column; min-height: 0; }
.cm-msgs { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.cm-bub { max-width: 75%; padding: 9px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-bub.me { align-self: flex-end; background: var(--forest); color: #fff; border: 0; }
.cm-unread { background: var(--clay); color: var(--forest-dark); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 7px; }

/* painel de mensagens no canto */
.cm-dock { position: fixed; right: 20px; bottom: 0; z-index: 1050; display: flex; align-items: flex-end; gap: 12px; }
.cm-dock-box { width: 320px; background: #fff; border: 1px solid var(--border); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -4px 30px #0002; display: flex; flex-direction: column; }
.cm-dock-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--border); font-weight: 600; }
.cm-dock-hd .cm-dock-x { margin-left: auto; color: var(--muted-light); display: flex; gap: 10px; }
.cm-dock-hd .cm-dock-x button, .cm-dock-hd .cm-dock-x a { border: 0; background: none; color: inherit; padding: 0; }
.cm-dock-list { height: 380px; overflow: auto; }
.cm-dock-list button { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--border); background: #fff; text-align: left; }
.cm-dock-list button:hover { background: var(--paper); }
.cm-dock-win .cm-msgs { height: 300px; padding: 12px; gap: 6px; }
.cm-dock-win .cm-bub { max-width: 85%; font-size: 14px; }

/* acolhimento e páginas de entrar */
.cm-gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, #e8b98a55, transparent 40%), var(--beige); }
.cm-gate-box { width: 100%; max-width: 520px; }
.cm-gate-box .ux-conta-cartao, .cm-onb { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 32px; }
.cm-gate-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; text-decoration: none; color: var(--forest-dark) !important; font-family: Vollkorn, serif; font-size: 20px; }
.cm-gate .btn-primary { background: var(--forest); border-color: var(--forest); }
.cm-gate .btn-primary:hover { background: var(--forest-dark); }
.cm-onb-wrap { max-width: 640px; margin: 4vh auto; }
.cm-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.cm-steps i { flex: 1; height: 5px; border-radius: 9px; background: #0001; }
.cm-steps i.on { background: var(--forest); }

/* perfil */
.cm-profile-head { margin-top: -48px; }
.cm-cover-pick { width: 44px; height: 28px; border-radius: 6px; cursor: pointer; border: 1px solid var(--border); }
.cm-cover-pick.on { outline: 3px solid var(--clay); }
.cm-photo-pick { position: relative; cursor: pointer; }
.cm-photo-pick .btn { position: absolute; right: 0; bottom: 0; }

@media (max-width: 1199px) { .cm-home { grid-template-columns: 1fr; } .cm-home .cm-aside { display: none; } }
@media (max-width: 991px) {
  .cm-rail { transform: translateX(-100%); width: 232px; }
  body.cm-open .cm-rail { transform: none; box-shadow: 0 0 40px #0005; }
  .cm-col { margin-left: 0; }
  .cm-chat { grid-template-columns: 1fr; }
  .cm-chat.has-thread .cm-chat-list { display: none; }
  .cm-chat:not(.has-thread) .cm-thread { display: none; }
}
@media (max-width: 767px) {
  .cm-top { grid-template-columns: auto 1fr auto; padding: 10px 12px; }
  .cm-main { padding: 16px 12px 90px; }
  .cm-dock { right: 0; left: 0; justify-content: flex-end; }
  .cm-dock-box { width: 100%; }
  .cm-dock-win + .cm-dock-box { display: none; }
  .cm-gate-box .ux-conta-cartao, .cm-onb { padding: 22px; }
}

/* utilitários */
.cm-w-price { max-width: 160px; }
.cm-w-search { max-width: 520px; }
.cm-av-sq { border-radius: 10px; }
.cm-lead { color: var(--muted); }
.min-w-0 { min-width: 0; }
.flex-none { flex: none; }
.cm-w-text { max-width: 720px; }
.cm-w-bar { min-width: 200px; }
.cm-quote-owner { background: #2D4C3610; }
.cm-w-form { max-width: 760px; }
.cm-card-dark { background: var(--forest-dark); color: #fffc; border: 0; }
.cm-card-dark .cm-serif { color: #fff; }
.cm-bar-dark { background: #fff2; }
.cm-card-alert { border-color: #b0302a44; }
.cm-reject summary { list-style: none; }
.cm-reject summary::-webkit-details-marker { display: none; }
.cm-reject[open] { flex-basis: 100%; }
/* links com aspecto de botão: o .cm a { color } não pode ganhar ao botão */
.cm a.cm-btn-forest, .cm a.cm-btn-clay { color: #fff; }
.cm a.cm-btn-soft { color: var(--text); }
.cm-ph-name { align-self: flex-start; margin-top: 56px; }
.cm-clay { color: var(--clay); }
.cm-w-count { min-width: 64px; }
.cm-prose { overflow-wrap: anywhere; }
.cm-cover-md { height: 140px; }
.cm-card-invite { border-color: var(--clay); }
.cm-option { display: block; padding: 14px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; }
.cm-option:has(input:checked) { border-color: var(--forest); }
.cm-option input { margin-right: 4px; }
/* Actividade no perfil */
.cm-act:hover { border-color: var(--forest); }
.cm-act-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--beige); color: var(--forest); display: grid; place-items: center; flex: none; }
.cm-act-body { color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
/* Imagens em notícias, publicações e fórum */
.cm-gal { display: grid; gap: 4px; margin-top: 12px; border-radius: 12px; overflow: hidden; grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
.cm-gal-1 { grid-template-columns: 1fr; grid-auto-rows: auto; }
.cm-gal-1 img { max-height: 480px; }
.cm-gal-2 { grid-auto-rows: 260px; }
.cm-gal-3 .cm-gal-i:first-child { grid-row: span 2; }
.cm-gal-i { display: block; background: var(--beige); cursor: zoom-in; }
.cm-gal-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-gal-pre { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-gal-pre:not(:empty) { margin-top: 8px; width: 100%; }
.cm-gal-pre img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cm-act-imgs { display: flex; gap: 4px; margin-top: 8px; align-items: center; }
.cm-act-imgs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.cm-act-imgs span { font-size: 13px; color: var(--muted-light); padding-left: 4px; }
.cm-more { font-weight: 600; white-space: nowrap; }
.cm-article { font-size: 1.05rem; line-height: 1.7; }
.cm-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 20, 14, .92); display: flex; align-items: center; justify-content: center; }
.cm-lb img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.cm-lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; }
.cm-lb .cm-lb-x { top: 16px; right: 16px; }
.cm-lb .cm-lb-prev { left: 16px; top: 50%; }
.cm-lb .cm-lb-next { right: 16px; top: 50%; }
.cm-lb-n { position: absolute; bottom: 16px; color: #fff; font-size: 13px; }
/* Gostos, apoios e comentários */
.cm-social { margin-top: 12px; }
.cm-rx-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cm-rx-row form { display: inline; }
.cm-rx { border: 1px solid var(--border); background: transparent; border-radius: 99px; padding: 3px 12px; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.cm-rx:hover { border-color: var(--forest); color: var(--forest); }
.cm-rx b { font-weight: 700; }
.cm-rx-like.on { background: #2D4C3614; border-color: var(--forest); color: var(--forest); }
.cm-rx-support.on { background: #C18C5D22; border-color: var(--clay); color: #8a5a2f; }
.cm-rx-e { font-size: 14px; line-height: 1; filter: grayscale(1) opacity(.7); }
.cm-rx-support.on .cm-rx-e { filter: none; }
.cm-rx-c { font-size: 13px; color: var(--muted); text-decoration: none; }
.cm-cmts { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.cm-cmt { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.cm-cmt-b { flex: 1; min-width: 0; background: var(--beige); border-radius: 12px; padding: 6px 12px; font-size: 14px; }
.cm-cmt-new { margin-bottom: 0; align-items: center; }
.cm-cmt-new textarea { resize: none; border-radius: 16px; }
