/* MXT Community — layout estilo Instagram Web, nos tokens do MXT One (claro e escuro). */
.community-shell { position: fixed; inset: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); background: var(--bg); color: var(--text); }
.community-shell.hidden { display: none; }
.community-shell button, .community-shell select { cursor: pointer; }
.community-shell button:focus-visible, .community-shell select:focus-visible, .community-shell textarea:focus-visible, .community-shell input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cm-icon { width: 22px; height: 22px; flex: none; }

/* Barra lateral fixa */
.cm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px; border-right: 1px solid var(--border); background: var(--sidebar); }
.cm-logo { display: flex; align-items: center; height: 58px; margin: 0 8px 14px; overflow: hidden; }
.cm-logo-image { width: 190px; height: 58px; object-fit: cover; object-position: 50% 51.5%; }
.cm-logo-on-light { display: none; object-position: 50% 54%; }
:root[data-theme="light"] .cm-logo-on-dark { display: none; }
:root[data-theme="light"] .cm-logo-on-light { display: block; }
.cm-nav { display: grid; gap: 4px; }
.cm-nav button, .cm-back { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font-size: 15px; font-weight: 600; text-align: left; transition: background .15s; }
.cm-nav button:hover, .cm-back:hover { background: var(--surface-2); }
.cm-nav button.active { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.cm-back { margin-top: auto; border: 1px solid var(--border); color: var(--text-2); }
.cm-dot { position: absolute; left: 30px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px var(--sidebar); }

/* Área central */
.cm-main { height: 100vh; overflow-y: auto; padding: 26px clamp(16px, 3vw, 40px) 60px; }
.cm-feed-grid { display: grid; grid-template-columns: minmax(0, 620px) 300px; gap: 32px; justify-content: center; }
.cm-feed, .cm-posts { display: grid; gap: 16px; align-content: start; }
.cm-right { display: grid; gap: 16px; align-content: start; position: sticky; top: 0; }
.cm-page { max-width: 960px; margin: 0 auto; display: grid; gap: 18px; align-content: start; }
.cm-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cm-page-head h1 { margin: 4px 0 6px; font-size: 30px; }
.cm-eyebrow { margin: 0; color: var(--accent); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cm-muted { color: var(--muted); }
.cm-card { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); padding: 16px; }
.cm-card-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-weight: 800; font-size: 15px; }
.cm-loading, .cm-empty { display: grid; gap: 4px; place-items: center; padding: 38px 16px; color: var(--muted); text-align: center; }
.cm-empty b { color: var(--text); }
.cm-empty.small { padding: 18px 8px; font-size: 13px; }
.cm-skeleton-line { height: 72px; border-radius: 14px; background: var(--surface-2); }

/* Avatares */
.cm-avatar { display: inline-grid; place-items: center; flex: 0 0 auto !important; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: 800; }
.cm-avatar img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; }
.cm-avatar.xs { width: 26px; height: 26px; min-width: 26px; min-height: 26px; font-size: 11px; }
.cm-avatar.sm { width: 32px; height: 32px; min-width: 32px; min-height: 32px; font-size: 13px; }
.cm-avatar.md { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: 15px; }
.cm-avatar.lg { width: 58px; height: 58px; min-width: 58px; min-height: 58px; font-size: 21px; }
.cm-avatar.xl { width: 118px; height: 118px; min-width: 118px; min-height: 118px; font-size: 42px; }
.cm-roles-group { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cm-person { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.cm-person > span { display: grid; gap: 3px; min-width: 0; }
.cm-person b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-role { display: inline-block; justify-self: start; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.cm-role.role-trafego { background: var(--info-soft); color: var(--info); }
.cm-role.role-social { background: rgba(239, 0, 140, .1); color: var(--pink); }
.cm-role.role-criativos { background: var(--success-soft); color: var(--success); }

/* Stories */
.cm-stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.cm-story { display: grid; justify-items: center; gap: 6px; flex: none; width: 72px; padding: 0; border: 0; background: none; color: var(--text-2); font-size: 12px; }
.cm-story small { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-story-ring { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; padding: 3px; background: var(--border-strong); }
.cm-story-ring.unseen { background: var(--gradient); }
.cm-story-ring .cm-avatar { box-shadow: 0 0 0 3px var(--bg); }
.cm-story.add i { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font-style: normal; font-weight: 900; box-shadow: 0 0 0 3px var(--bg); }
.cm-story-ring.has { background: var(--gradient); }

/* Criar publicação */
.cm-composer { display: grid; gap: 12px; }
.cm-composer-row { display: flex; gap: 12px; align-items: flex-start; }
.cm-composer textarea { flex: 1; min-height: 56px; resize: vertical; border: 0; background: transparent; color: var(--text); font-size: 15px; outline: none; }
.cm-composer-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); }
.cm-composer-actions select { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--field); color: var(--text); font-size: 13px; max-width: 200px; }
.cm-composer-actions .cm-primary { margin-left: auto; }
.cm-create-page { max-width: 760px; }
.cm-create-page .cm-composer textarea { min-height: 150px; }
.cm-upload-preview { position: relative; }
.cm-preview-media { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; }
.cm-upload-preview .cm-icon-button { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff; }
.cm-chip-button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 700; }
.cm-chip-button:hover { border-color: var(--accent-border); color: var(--text); }
.cm-chip-button .cm-icon { width: 18px; height: 18px; }
.cm-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--gradient); color: #fff; font-weight: 800; box-shadow: 0 6px 16px rgba(139, 53, 255, .22); }
.cm-primary:disabled { opacity: .6; cursor: wait; }
.cm-primary .cm-icon { width: 18px; height: 18px; }
.cm-icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.cm-icon-button:hover { background: var(--surface-2); color: var(--text); }
.cm-icon-button .cm-icon { width: 18px; height: 18px; }
.cm-link { border: 0; background: none; color: var(--accent); font-weight: 800; font-size: 13px; padding: 6px 0; }

/* Filtros */
.cm-filters, .cm-segmented { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cm-filters button, .cm-segmented button { flex: none; height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 700; }
.cm-filters button.active, .cm-segmented button.active { border-color: transparent; background: var(--gradient); color: #fff; }
.cm-newposts { justify-self: center; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--gradient); color: #fff; font-weight: 800; box-shadow: var(--shadow-md); }
.cm-more { justify-self: center; height: 38px; padding: 0 20px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 700; }

/* Publicação */
.cm-post { display: grid; gap: 12px; padding: 14px 16px; }
.cm-post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cm-post-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.cm-category { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 11.5px; }
.cm-post-text { margin: 0; font-size: 15px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.cm-post-media { margin: 0 -16px; background: #000; }
.cm-media { display: block; width: 100%; max-height: 640px; object-fit: contain; background: #000; }
.cm-post-badge { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--gradient-soft); font-size: 13.5px; }
.cm-post-actions { display: flex; gap: 6px; }
.cm-like, .cm-comment-toggle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 700; }
.cm-like:hover, .cm-comment-toggle:hover { background: var(--surface-2); }
.cm-like.liked { color: var(--pink); }
.cm-like.liked .cm-icon { fill: var(--pink); }
.cm-like.pop .cm-icon { animation: cm-pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cm-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.cm-comments { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.cm-comment { display: flex; gap: 10px; align-items: flex-start; }
.cm-comment p { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cm-comment time { margin-left: 8px; color: var(--muted); font-size: 12px; }
.cm-comment-form { display: flex; align-items: center; gap: 10px; }
.cm-comment-form input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--field); color: var(--text); }

/* Coluna da direita */
.cm-me-card { display: grid; gap: 10px; }
.cm-person.big b { font-size: 16px; }
.cm-level { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; }
.cm-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.cm-progress.big { height: 10px; }
.cm-progress i { display: block; height: 100%; width: var(--progress, 0%); border-radius: inherit; background: var(--gradient); transition: width .6s ease; }
.cm-mini-rank { display: grid; gap: 4px; }
.cm-rank-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 6px; border: 0; border-radius: 10px; background: none; color: inherit; text-align: left; }
.cm-rank-row:hover { background: var(--surface-2); }
.cm-rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-rank-row.big .cm-rank-name { display: grid; gap: 3px; }
.cm-rank-xp { min-width: 90px; text-align: right; }
.cm-pos { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); font-weight: 900; font-size: 13px; }
.cm-pos.p1 { background: linear-gradient(135deg, #fff1b3, #f7c548 50%, #b9770e); color: #5c3700; }
.cm-pos.p2 { background: linear-gradient(135deg, #ffffff, #d9e2ee 50%, #8b9bb0); color: #2e3a4e; }
.cm-pos.p3 { background: linear-gradient(135deg, #ffe2c7, #e09a5b 50%, #a35a20); color: #4a2205; }

/* Ranking: pódio */
.cm-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.cm-podium-place { position: relative; display: grid; justify-items: center; gap: 8px; padding: 18px 12px 0; border: 1px solid var(--border); border-radius: 20px 20px 0 0; background: var(--surface); color: inherit; text-align: center; overflow: hidden; }
.cm-podium-place.empty { min-height: 120px; border-style: dashed; background: transparent; }
.cm-podium-place .cm-cup { width: 74px; height: 74px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .18)); }
.cm-podium-place.place-1 { padding-top: 26px; background: linear-gradient(180deg, rgba(247, 197, 72, .16), var(--surface) 70%); }
.cm-podium-place.place-1 .cm-cup { width: 96px; height: 96px; }
.cm-podium-place.place-2 { background: linear-gradient(180deg, rgba(139, 155, 176, .16), var(--surface) 70%); }
.cm-podium-place.place-3 { background: linear-gradient(180deg, rgba(224, 154, 91, .16), var(--surface) 70%); }
.cm-podium-xp { font-weight: 900; font-size: 18px; }
.cm-podium-step { align-self: stretch; margin: 8px -12px 0; padding: 16px 0; background: var(--surface-2); font-size: 26px; font-weight: 900; color: var(--muted); }
.place-1 .cm-podium-step { padding: 30px 0; background: var(--gradient); color: #fff; }
.place-2 .cm-podium-step { padding: 20px 0; }
.cm-rank-table { display: grid; gap: 2px; padding: 8px; }

/* Perfil */
.cm-profile-head { display: flex; gap: 28px; align-items: center; padding: 26px; }
.cm-profile-info { flex: 1; display: grid; gap: 10px; min-width: 0; }
.cm-profile-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cm-profile-title h1 { margin: 0; font-size: 26px; }
.cm-profile-stats { display: flex; gap: 22px; flex-wrap: wrap; color: var(--text-2); }
.cm-profile-stats b { color: var(--text); }
.cm-bio { margin: 0; line-height: 1.5; }
.cm-edit-profile { display: grid; gap: 12px; }
.cm-avatar-editor { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.cm-avatar-editor > div { display: grid; gap: 5px; }
.cm-avatar-editor-actions { display: flex; align-items: center; gap: 12px; margin-top: 5px; flex-wrap: wrap; }
.cm-danger-link { color: var(--danger); }
.cm-edit-profile label, .cm-form-grid label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.cm-edit-profile select, .cm-edit-profile textarea, .cm-form-grid select, .cm-form-grid input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--field); color: var(--text); font-weight: 500; }
.cm-row-end { display: flex; justify-content: flex-end; gap: 8px; }
.cm-badge-group + .cm-badge-group { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.cm-badge-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cm-badge-group-head b { font-size: 15px; }
.cm-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.cm-badge { display: grid; justify-items: center; gap: 6px; padding: 16px 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); color: inherit; transition: transform .18s, border-color .18s; }
.cm-badge:hover { transform: translateY(-3px); border-color: var(--accent-border); }
.cm-badge-svg { filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .25)); transition: transform .25s; }
.cm-badge:hover .cm-badge-svg { transform: rotate(-4deg) scale(1.05); }
.cm-badge-svg.locked { filter: grayscale(1) opacity(.55); }
.cm-badge.locked b, .cm-badge.locked small { color: var(--muted); }
.cm-badge small { color: var(--accent); font-weight: 800; }
.cm-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cm-history li { display: flex; gap: 12px; align-items: baseline; font-size: 14px; }
.cm-history li span { flex: 1; color: var(--text-2); }
.cm-history time { color: var(--muted); font-size: 12px; }
.cm-history .plus { color: var(--success); }
.cm-history .minus { color: var(--danger); }

/* Modal do selo */
.cm-profile-modal { width: min(520px, 94vw); padding: 0; overflow: hidden; }
.cm-profile-popup { position: relative; display: grid; gap: 16px; padding: 26px; }
.cm-profile-popup.cm-loading { min-height: 240px; place-items: center; }
.cm-profile-popup-head { display: flex; align-items: center; gap: 18px; padding-right: 32px; }
.cm-profile-popup-head > div { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.cm-profile-popup-head h2 { margin: 0; font-size: 25px; overflow-wrap: anywhere; }
.cm-profile-popup-bio { margin: 0; line-height: 1.55; }
.cm-profile-popup-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cm-profile-popup-stats span { display: grid; justify-items: center; gap: 2px; padding: 11px 6px; border-radius: 12px; background: var(--surface-2); }
.cm-profile-popup-stats b { font-size: 17px; }
.cm-profile-popup-stats small { color: var(--muted); font-size: 11px; }
.cm-profile-popup-badges { padding-top: 4px; border-top: 1px solid var(--border); }
.cm-profile-popup-badges > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-profile-popup-badges .cm-badge-svg { filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .18)); }
.cm-profile-popup-badges p { margin: 0; font-size: 13px; }
.cm-profile-popup-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.cm-badge-modal { width: min(440px, 94vw); padding: 0; }
.cm-badge-detail { position: relative; display: grid; justify-items: center; gap: 8px; padding: 30px 28px 26px; text-align: center; }
.cm-badge-detail h2 { margin: 0; font-size: 26px; }
.cm-badge-detail p { margin: 0; }
.cm-modal-close { position: absolute; top: 12px; right: 12px; }
.cm-badge-stage { display: grid; place-items: center; width: 230px; height: 230px; margin-bottom: 6px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.cm-badge-stage .cm-badge-svg { animation: cm-float 4s ease-in-out infinite; }
.cm-badge-stage.locked .cm-badge-svg { animation: none; }
@keyframes cm-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.cm-badge-facts { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 8px; color: var(--text-2); font-size: 14px; }
.cm-badge-reason { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }

/* Visualizador de stories */
.cm-viewer { width: min(420px, 100vw); height: min(760px, 100dvh); max-height: 100dvh; padding: 0; border: 0; border-radius: 18px; background: #000; color: #fff; overflow: hidden; }
.cm-viewer::backdrop { background: rgba(0, 0, 0, .86); }
.cm-viewer-box { position: relative; height: 100%; display: flex; flex-direction: column; }
.cm-viewer-bars { display: flex; gap: 4px; padding: 10px 10px 0; position: relative; z-index: 2; }
.cm-viewer-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.cm-viewer-bars span.done i { width: 100%; }
.cm-viewer-bars i { display: block; height: 100%; width: 0; background: #fff; }
.cm-viewer header { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.cm-viewer header time { color: rgba(255, 255, 255, .7); font-size: 12px; margin-right: auto; }
.cm-viewer header .cm-icon-button { color: #fff; }
.cm-viewer-media { flex: 1; display: grid; place-items: center; min-height: 0; }
.cm-viewer-content { max-width: 100%; max-height: 100%; object-fit: contain; }
.cm-viewer-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; padding: 40px 16px 20px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); font-size: 15px; }
.cm-viewer-prev, .cm-viewer-next { position: absolute; top: 70px; bottom: 60px; width: 35%; border: 0; background: transparent; z-index: 1; }
.cm-viewer-prev { left: 0; }
.cm-viewer-next { right: 0; }

/* Direct */
.cm-dm { grid-template-columns: 320px minmax(0, 1fr); max-width: 1100px; height: calc(100vh - 86px); }
.cm-dm-list { overflow-y: auto; }
.cm-conv { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; }
.cm-conv:hover, .cm-conv.active { background: var(--surface-2); }
.cm-conv > .cm-avatar { flex: 0 0 40px !important; width: 40px !important; height: 40px !important; }
.cm-conv > span:not(.cm-avatar) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.cm-conv small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cm-badge-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--pink); color: #fff; font-style: normal; font-size: 11.5px; font-weight: 900; display: grid; place-items: center; }
.cm-dm-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.cm-chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cm-chat-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.cm-msg { align-self: flex-start; max-width: min(70%, 520px); padding: 9px 13px; border-radius: 18px 18px 18px 4px; background: var(--surface-2); }
.cm-msg.mine { align-self: flex-end; border-radius: 18px 18px 4px 18px; background: var(--gradient); color: #fff; }
.cm-msg p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.cm-msg time { display: block; margin-top: 3px; font-size: 11px; opacity: .7; text-align: right; }
.cm-msg-media { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; margin-bottom: 4px; }
.cm-file { display: inline-flex; align-items: center; gap: 6px; color: inherit; font-weight: 700; }
.cm-chat-form { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.cm-chat-form input { flex: 1; height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--field); color: var(--text); }
.cm-chat-attachment { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--accent); }

/* Configurações */
.cm-access-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 12px 0; }
.cm-check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.cm-check input { width: 17px; height: 17px; accent-color: var(--purple); }
.cm-check span { display: grid; min-width: 0; }
.cm-check small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.cm-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.cm-form-grid .wide { grid-column: 1 / -1; }
.cm-code { margin: 12px 0 0; padding: 14px; border-radius: 12px; background: var(--code); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Funções múltiplas, resultados automáticos e sincronização */
.cm-roles-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.cm-roles-picker legend { padding: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.cm-roles-group { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cm-metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cm-metric { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.cm-metric small { color: var(--muted); font-size: 12px; font-weight: 700; }
.cm-metric b { font-size: 19px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cm-metric b a { color: var(--accent); }
.cm-sync-line { margin: 8px 0; font-size: 14px; color: var(--text-2); }
.cm-sync-warn { margin: 6px 0; padding: 8px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-size: 13px; }
.cm-social-block { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }

/* Responsivo */
@media (max-width: 1180px) { .cm-feed-grid { grid-template-columns: minmax(0, 620px); } .cm-right { display: none; } }
@media (max-width: 900px) {
  .community-shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .cm-side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; flex-direction: row; padding: 6px 8px; border-right: 0; border-top: 1px solid var(--border); z-index: 30; }
  .cm-logo, .cm-nav > button > span:not(.cm-avatar), .cm-back span { display: none; }
  .cm-nav { display: flex; flex: 1; justify-content: space-around; }
  .cm-nav button, .cm-back { width: 44px; min-height: 44px; justify-content: center; padding: 10px; }
  .cm-back { margin: 0; border: 0; }
  .cm-main { padding: 16px 12px 90px; }
  .cm-dm { grid-template-columns: 1fr; height: auto; }
  .cm-profile-head { flex-direction: column; text-align: center; }
  .cm-profile-title, .cm-profile-stats { justify-content: center; }
  .cm-form-grid { grid-template-columns: 1fr; }
  .cm-podium { gap: 8px; }
}
@media (max-width: 560px) {
  .cm-main { padding-inline: 8px; }
  .cm-card { border-radius: 14px; }
  .cm-post-meta .cm-category { display: none; }
  .cm-composer-actions select { max-width: 100%; flex: 1 1 140px; }
  .cm-composer-actions .cm-primary { width: 100%; margin-left: 0; }
  .cm-podium-place { padding-inline: 6px; }
  .cm-podium-place .cm-cup { width: 54px; height: 54px; }
  .cm-podium-place.place-1 .cm-cup { width: 66px; height: 66px; }
  .cm-podium-place .cm-avatar.lg { width: 46px; height: 46px; }
  .cm-rank-row.big { flex-wrap: wrap; }
  .cm-rank-row.big .cm-muted { width: 100%; padding-left: 46px; }
  .cm-rank-xp { min-width: auto; }
  .cm-dm { gap: 10px; }
  .cm-dm-list { max-height: 240px; }
  .cm-dm-chat { min-height: 440px; }
  .cm-msg { max-width: 86%; }
  .cm-chat-form { flex-wrap: wrap; }
  .cm-chat-form input { min-width: 0; }
  .cm-profile-popup { padding: 22px 18px 18px; }
  .cm-profile-popup-head { align-items: flex-start; }
  .cm-profile-popup-head .cm-avatar.xl { width: 82px; height: 82px; font-size: 30px; }
  .cm-profile-popup-stats { grid-template-columns: repeat(2, 1fr); }
  .cm-profile-popup-actions > button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .community-shell *, .community-shell *::before, .community-shell *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
