/* EAI City — building clubs (community feed) + residents-online pill. Owner: community. Prefix: cm-.
   Calm editorial feed: white cards with hairlines, reputation as a subtle tag, the expert (AI) answer in a tinted block
   clearly apart from residents' replies. --bc is the building colour (set inline by EAI.community.mount, calm tone). */

.cm-root, .cm-modal {
  --bc: var(--primary);
  --bc-l: color-mix(in srgb, var(--bc) 10%, var(--panel));
  --bc-ll: color-mix(in srgb, var(--bc) 5%, var(--panel));
  --bc-m: color-mix(in srgb, var(--bc) 28%, var(--panel));
  --bc-ink: color-mix(in srgb, var(--bc) 70%, #111);
}
.cm-root {
  container-type: inline-size; width: 100%; /* size containment: never let a shrink-to-fit parent collapse it */
  display: flex; flex-direction: column; gap: 14px;
  color: var(--ink); font-family: var(--font);
  min-width: 0;
}
.cm-root *, .cm-modal * { -webkit-tap-highlight-color: transparent; }
.cm-root [hidden], .cm-modal [hidden] { display: none !important; }
.cm-root .btn.flat, .cm-modal .btn.flat { box-shadow: none; color: var(--primary); }

/* ---------------------------------------------------------------- residents-online pill (EAI.presence.el) */
.cm-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 11px 3px 9px; border-radius: 999px; background: var(--success-l); color: var(--success); font-family: var(--font); font-weight: 700; font-size: 0.84rem; line-height: 1.1; white-space: nowrap; }
.cm-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: #3fa171; box-shadow: 0 0 0 3px rgba(63, 161, 113, 0.18); flex: none; }
.cm-pill__e { display: none; }
.cm-pill__n { font-weight: 800; }
.cm-pill.is-alone { background: var(--panel3); color: var(--ink2); }
.cm-pill.is-alone .cm-pill__dot { background: var(--ink3); box-shadow: none; }

/* ---------------------------------------------------------------- header */
.cm-head { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.cm-head__top { display: flex; align-items: center; gap: 16px; }
.cm-head__mark { --tc: var(--bc-l); --ti: var(--bc-ink); }
.cm-head__txt { flex: 1 1 0; min-width: 0; }
.cm-head__title { font: 700 1.6rem/1.15 var(--display); margin: 0 0 8px; }
.cm-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-head__count { font-weight: 600; font-size: 0.84rem; color: var(--ink2); }
.cm-head__cta { flex: none; }
.cm-write { gap: 8px; }
.cm-rule { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--panel2); font-size: 0.9rem; font-weight: 500; color: var(--ink2); }
.cm-rule .ico { width: 18px; height: 18px; color: var(--ink3); }
@container (max-width: 620px) {
  .cm-head { padding: 16px; }
  .cm-head__top { flex-wrap: wrap; align-items: flex-start; }
  .cm-head__title { font-size: 1.35rem; }
  .cm-head__cta { flex: 1 1 100%; }
  .cm-head__cta .cm-write { width: 100%; }
}

/* compact header (preview on another tab) */
.cm-mini { display: flex; align-items: center; gap: 12px; padding: 4px 2px; }
.cm-mini__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cm-mini__t > b { font: 700 1.15rem var(--display); }

/* ---------------------------------------------------------------- notices */
.cm-notices:empty { display: none; }
.cm-notices { display: flex; flex-direction: column; gap: 8px; }
.cm-notice { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-weight: 500; font-size: 0.9rem; line-height: 1.4; }
.cm-notice .ico { width: 18px; height: 18px; flex: none; }
.cm-notice.is-ro { background: var(--warn-l); color: var(--warn-t); }
.cm-notice.is-local { background: var(--panel2); color: var(--ink2); font-size: 0.86rem; padding: 9px 14px; }
.cm-notice.is-local .ico { color: var(--ink3); }
.cm-notice.is-info { background: var(--primary-ll); color: var(--primary); }

/* ---------------------------------------------------------------- filters & sort */
.cm-bar { display: flex; align-items: center; gap: 10px 14px; justify-content: space-between; min-width: 0; }
.cm-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; flex: 1 1 auto; min-width: 0; scroll-snap-type: x proximity; }
.cm-chips::-webkit-scrollbar { display: none; }
.cm-chips .chip { flex: none; min-height: 40px; padding: 7px 16px; font-size: 0.93rem; scroll-snap-align: start; }
.cm-sort { display: inline-flex; flex: none; padding: 4px; gap: 2px; border-radius: 12px; background: var(--panel3); }
.cm-sort button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink2); font-family: var(--font); font-weight: 600; font-size: 0.96rem; white-space: nowrap; }
.cm-sort button .ico { width: 16px; height: 16px; }
.cm-sort button:hover { color: var(--ink); }
.cm-sort button.on { background: var(--panel); color: var(--ink); box-shadow: var(--sh-1); }
@container (max-width: 620px) {
  .cm-bar { flex-direction: column; align-items: stretch; }
  .cm-sort { align-self: flex-start; }
}

/* ---------------------------------------------------------------- list, states */
.cm-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cm-divider { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; color: var(--ink3); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.cm-divider::before, .cm-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cm-empty, .cm-state { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 26px 20px; border-radius: 16px; border: 1px dashed var(--line2); background: rgba(255, 255, 255, 0.6); color: var(--ink2); font-weight: 500; }
.cm-empty b, .cm-state b { font-weight: 700; font-size: 1.04rem; color: var(--ink); }
.cm-empty .isq, .cm-state .isq { margin-bottom: 4px; }
.cm-empty .btn, .cm-state .btn { margin-top: 8px; }
.cm-state.is-err { border-color: #efcfca; background: var(--danger-l); }
.cm-foot:empty { display: none; }
.cm-foot__t { text-align: center; color: var(--ink3); font-weight: 500; font-size: 0.86rem; padding: 4px 0 10px; }
.cm-skels { display: flex; flex-direction: column; gap: 12px; }
.cm-skel { position: relative; height: 150px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.cm-skel i { position: absolute; display: block; border-radius: 8px; background: linear-gradient(90deg, var(--panel2) 20%, var(--panel3) 50%, var(--panel2) 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.cm-skel .a { left: 18px; top: 18px; width: 40px; height: 40px; border-radius: 50%; }
.cm-skel .b { left: 70px; top: 24px; width: 38%; height: 12px; }
.cm-skel .c { left: 18px; top: 74px; right: 18px; height: 12px; }
.cm-skel .d { left: 18px; top: 98px; width: 62%; height: 12px; }

/* ---------------------------------------------------------------- post card */
.cm-post { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; min-width: 0; transition: box-shadow 0.25s ease, opacity 0.25s ease; }
.cm-post__main { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 10px; }
.cm-post.is-mine { border-color: var(--bc-m); }
.cm-post.is-new { animation: cm-flash 2.4s ease; }
.cm-post.is-removing { opacity: 0.45; pointer-events: none; }
@keyframes cm-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--gold-l), 0 0 0 4px var(--gold); } 100% { box-shadow: 0 0 0 0 transparent; } }
.cm-post__head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.cm-post__head > .ava { width: 42px; height: 42px; }
.cm-post__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.cm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.cm-nick { font-weight: 700; font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; }
.cm-rank { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em; background: var(--panel3); color: var(--ink2); white-space: nowrap; }
.cm-rank.r1 { background: var(--bc-l); color: var(--bc-ink); }
.cm-rank.r2 { background: var(--gold-l); color: var(--gold-t); }
.cm-rank[hidden] { display: none; }
.cm-you { padding: 2px 7px; border-radius: 5px; font-size: 0.76rem; font-weight: 700; background: var(--primary-l); color: var(--primary); }
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 0.84rem; font-weight: 500; color: var(--ink3); }
.cm-meta:empty { display: none; }
.cm-dot { color: var(--line2); }
.cm-tags { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 42%; }
.cm-sec { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--ink2); font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-sec::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--bc); flex: none; }
.cm-ex { display: inline-flex; padding: 2px 8px; border-radius: 5px; border: 1px dashed var(--line2); color: var(--ink3); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em; background: var(--panel); }
@container (max-width: 520px) {
  .cm-post__main { padding: 14px 14px 8px; }
  .cm-post__head { flex-wrap: wrap; row-gap: 8px; }
  .cm-tags { order: 3; flex: 1 1 100%; flex-direction: row; align-items: center; max-width: none; padding-left: 54px; }
}
.cm-post__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cm-post__row { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.cm-post__txt { flex: 1 1 auto; min-width: 0; }
.cm-text { margin: 0; font-size: 1rem; line-height: 1.6; font-weight: 500; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }
.cm-text.is-clamped.is-open { display: block; -webkit-line-clamp: unset; }
.cm-more { margin-top: 4px; padding: 6px 0; min-height: 44px; border: 0; background: none; color: var(--primary); font-weight: 700; font-size: 0.98rem; }
.cm-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.cm-photo { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--panel2); }
.cm-photo img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.cm-photo__zoom { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(14, 19, 26, 0.6); color: #fff; opacity: 0.85; transition: opacity 0.2s ease; }
.cm-photo__zoom .ico { width: 18px; height: 18px; }
.cm-photo:hover .cm-photo__zoom { opacity: 1; }
.cm-warn { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--warn-l); color: var(--warn-t); font-weight: 600; font-size: 0.88rem; }
.cm-warn .ico { width: 16px; height: 16px; }
.cm-warn[hidden] { display: none; }
.cm-hidden { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 12px 16px; color: var(--ink2); font-weight: 500; font-size: 0.9rem; }
.cm-hidden > span { display: inline-flex; align-items: center; gap: 8px; }
.cm-hidden .ico { width: 16px; height: 16px; color: var(--ink3); }
.cm-post.is-hidden { background: var(--panel2); border-style: dashed; }

/* ---------------------------------------------------------------- the expert answer («Анна отвечает») */
.cm-xp-slot:empty, .cm-thread-slot:empty { display: none; }
.cm-xp { position: relative; padding: 14px 16px 14px 18px; border-radius: 14px; background: var(--bc-ll); border: 1px solid var(--bc-m); }
.cm-xp::before { content: ''; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--bc-ink); }
.cm-xp__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cm-xp__ava, .cm-xp__head > .ava { width: 36px; height: 36px; border-width: 2px; }
.cm-xp__bot { display: grid; place-items: center; background: var(--panel); color: var(--bc-ink); }
.cm-xp__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.cm-xp__who b { font-weight: 700; font-size: 0.98rem; color: var(--ink); }
.cm-xp__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cm-xp__sub small { font-size: 0.8rem; font-weight: 500; color: var(--ink2); }
.cm-ai { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1.5; background: var(--plum-l); color: var(--plum); }
.cm-ai .ico { width: 12px; height: 12px; }
.cm-ai.is-demo { background: var(--gold-l); color: var(--gold-t); }
.cm-md { font-size: 0.97rem; line-height: 1.6; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.cm-md p { margin: 0 0 6px; } .cm-md p:last-child { margin-bottom: 0; }
.cm-md ul, .cm-md ol { margin: 4px 0 6px; padding-left: 1.3em; }
.cm-md li { margin: 3px 0; }
.cm-md h4 { font-size: 1rem; margin: 8px 0 4px; }
.cm-md code { font-size: 0.9em; padding: 1px 5px; border-radius: 6px; background: rgba(255, 255, 255, 0.7); }
.cm-xp.is-long .cm-md { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.cm-xp.is-long.is-open .cm-md { max-height: none; -webkit-mask-image: none; mask-image: none; }
.cm-xp .cm-more { padding-bottom: 0; }
.cm-xp.is-thinking .cm-xp__head { margin-bottom: 4px; }
.cm-typing { display: flex; gap: 5px; padding: 6px 2px 2px 46px; }
.cm-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--bc-ink); opacity: 0.35; animation: cm-typing 1.2s infinite ease-in-out; }
.cm-typing i:nth-child(2) { animation-delay: 0.15s; } .cm-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes cm-typing { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.cm-xp-ask { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 14px 9px 10px; text-align: left; border-radius: 14px; border: 1px dashed var(--bc-m); background: var(--panel); color: var(--ink); transition: background-color 0.15s ease, border-color 0.15s ease; }
.cm-xp-ask:hover { background: var(--bc-ll); border-color: var(--bc-ink); border-style: solid; }
.cm-xp-ask__ava { width: 38px; height: 38px; border-width: 2px; }
.cm-xp-ask__t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cm-xp-ask__t b { font-weight: 700; font-size: 0.98rem; }
.cm-xp-ask__t small { font-size: 0.82rem; font-weight: 500; color: var(--ink2); }
.cm-xp-ask__i { width: 20px; height: 20px; color: var(--gold-d); }

/* ---------------------------------------------------------------- actions */
.cm-acts { display: flex; align-items: center; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); min-width: 0; }
.cm-acts .grow { flex: 1 1 auto; }
.cm-act { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink2); font-family: var(--font); font-weight: 700; font-size: 0.98rem; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease; }
.cm-act .ico { width: 19px; height: 19px; }
.cm-act:hover { background: var(--panel2); color: var(--ink); }
.cm-act[disabled] { cursor: default; opacity: 0.7; }
.cm-act[disabled]:hover { background: transparent; color: var(--ink2); }
.cm-act__l { font-weight: 600; font-size: 0.94rem; }
.cm-like.on { color: var(--danger); }
.cm-like.on .ico { color: var(--danger); }
.cm-like.pop .ico { animation: fadeIn 0.3s ease; }
.cm-cmts.on { background: var(--primary-ll); color: var(--primary); }
.cm-cmts.has-new::after { content: ''; position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--panel); }
.cm-flag, .cm-del { color: var(--ink3); padding: 8px 10px; }
.cm-flag:hover { background: var(--warn-l); color: var(--warn-t); }
.cm-del:hover { background: var(--danger-l); color: var(--danger); }
@container (max-width: 560px) {
  .cm-act__l { display: none; }
  .cm-acts { gap: 2px; }
  .cm-act { padding: 8px 11px; }
  .cm-flag, .cm-del { padding: 8px; }
}

/* ---------------------------------------------------------------- comments thread (residents) */
.cm-thread { display: flex; flex-direction: column; gap: 12px; margin: 2px -6px 8px; padding: 14px 12px 12px; border-radius: 14px; background: var(--panel2); }
.cm-clist { display: flex; flex-direction: column; gap: 10px; }
.cm-clist__state { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px; color: var(--ink2); font-weight: 500; font-size: 0.92rem; text-align: center; }
.cm-clist__state .ico { width: 18px; height: 18px; color: var(--ink3); }
.cm-clist__state .spinner { width: 18px; height: 18px; }
.cm-cmt { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.cm-cmt > .ava { width: 32px; height: 32px; margin-top: 2px; }
.cm-cmt__bubble { position: relative; min-width: 0; max-width: 100%; padding: 8px 14px 9px; border-radius: 4px 14px 14px 14px; background: var(--panel); border: 1px solid var(--line); }
.cm-cmt.is-mine .cm-cmt__bubble { background: var(--primary-ll); border-color: #d5e6e6; }
.cm-cmt__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 2px; }
.cm-cmt__nick { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.cm-cmt__au { padding: 0 6px; border-radius: 5px; background: var(--panel3); color: var(--ink2); font-size: 0.76rem; font-weight: 700; }
.cm-cmt__au.you { background: var(--primary-l); color: var(--primary); }
.cm-cmt__time { color: var(--ink3); font-size: 0.78rem; font-weight: 500; }
.cm-cmt__text { margin: 0; font-size: 0.96rem; line-height: 1.5; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-cmt__del { margin-top: 2px; padding: 2px 8px 2px 0; min-height: 40px; border: 0; background: none; color: var(--ink2); font-weight: 600; font-size: 0.9rem; }
.cm-cmt__del:hover { color: var(--danger); text-decoration: underline; }
.cm-reply-row { display: flex; align-items: flex-end; gap: 8px; }
.cm-reply-row > .ava { width: 32px; height: 32px; margin-bottom: 7px; }
.cm-reply { min-height: 46px; max-height: 160px; padding: 11px 16px; border-radius: 23px; font-size: 0.98rem; font-weight: 500; overflow-y: auto; }
.cm-send.btn.round { width: 46px; min-width: 46px; height: 46px; min-height: 46px; }
.cm-send .ico { width: 20px; height: 20px; }
.cm-reply__hint { padding-left: 42px; font-size: 0.82rem; font-weight: 500; color: var(--ink3); }
.cm-reply__hint:empty { display: none; }
.cm-reply__hint.is-err { color: var(--warn-t); background: var(--warn-l); padding: 8px 12px; margin-left: 40px; border-radius: 10px; }
.cm-thread__ro { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--warn-l); color: var(--warn-t); font-size: 0.88rem; font-weight: 600; }
.cm-thread__ro .ico { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- composer */
.cm-comp-slot:empty { display: none; }
.cm-comp { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--bc-m); box-shadow: var(--sh-2); animation: rise 0.22s var(--ease); }
.cm-comp.in-modal { padding: 0; border: 0; box-shadow: none; animation: none; }
.cm-comp__head { display: flex; align-items: center; gap: 10px; }
.cm-comp__head > .ava { width: 40px; height: 40px; }
.cm-comp__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cm-comp__who b { font-weight: 700; }
.cm-comp__who span { font-size: 0.86rem; font-weight: 500; color: var(--ink2); }
.cm-comp__x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel2); color: var(--ink2); }
.cm-comp__x:hover { background: var(--panel3); color: var(--ink); }
.cm-comp__x .ico { width: 18px; height: 18px; }
.cm-comp__label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); margin-bottom: -4px; }
.cm-comp__secs { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-comp__secs .chip { min-height: 40px; }
.cm-comp__ta { min-height: 128px; line-height: 1.55; }
.cm-comp.in-modal .cm-comp__ta { min-height: 140px; }
.cm-comp__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cm-photo-btn.btn.sm { min-height: 42px; padding: 8px 14px; font-size: 0.92rem; }
.cm-file { display: none; }
.cm-count { font-size: 0.8rem; font-weight: 600; color: var(--ink3); }
.cm-count.warn { color: var(--danger); }
.cm-prev-wrap:empty { display: none; }
.cm-prev { position: relative; display: inline-flex; max-width: 260px; border-radius: 12px; overflow: hidden; box-shadow: var(--sh-1); background: var(--panel2); }
.cm-prev img { display: block; max-height: 190px; max-width: 100%; object-fit: cover; }
.cm-comp.in-modal .cm-prev img { max-height: 150px; }
.cm-prev.is-busy { align-items: center; gap: 10px; padding: 14px 18px; color: var(--ink2); font-weight: 500; box-shadow: none; }
.cm-prev__x { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(14, 19, 26, 0.7); color: #fff; }
.cm-prev__x .ico { width: 16px; height: 16px; }
.cm-note { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bc-ll); border: 1px solid var(--bc-m); }
.cm-note > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-note b { font-weight: 700; font-size: 0.94rem; }
.cm-note__q { font-size: 0.84rem; font-weight: 500; color: var(--ink2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.cm-note__ava { width: 36px; height: 36px; border-width: 2px; }
.cm-err { padding: 10px 14px; border-radius: 10px; background: var(--warn-l); color: var(--warn-t); font-weight: 600; font-size: 0.92rem; line-height: 1.4; }
.cm-err[hidden] { display: none; }
.cm-comp__acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
.cm-pub { min-width: 190px; }
.cm-spin { width: 18px; height: 18px; border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.cm-send .cm-spin { width: 18px; height: 18px; }
@container (max-width: 520px) {
  .cm-comp { padding: 16px; }
  .cm-comp__acts .btn { flex: 1; min-width: 0; }
}
@media (max-width: 600px) {
  .cm-comp.in-modal .cm-comp__acts .btn { flex: 1; min-width: 0; }
  .cm-modal .cm-comp__secs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .cm-modal .cm-comp__secs .chip { flex: none; }
}

/* ---------------------------------------------------------------- dialogs */
.cm-reasons { display: flex; flex-direction: column; gap: 14px; }
.cm-reasons__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.cm-reason { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; text-align: left; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 0.96rem; transition: background-color 0.15s ease, border-color 0.15s ease; }
.cm-reason:hover { background: var(--panel2); border-color: var(--line2); }
.cm-reason .ico { width: 20px; height: 20px; color: var(--ink2); }
.modal.cm-lightbox { width: min(1100px, 100%); padding: 10px; background: #10151b; }
.modal.cm-lightbox .modal__close { background: rgba(255, 255, 255, 0.92); }
.cm-lightbox__img { display: block; width: 100%; max-height: calc(88vh - 20px); object-fit: contain; border-radius: 12px; }

/* ---------------------------------------------------------------- gates (closed club, residents under 14) */
.cm-gate { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 32px 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.cm-gate .isq { margin-bottom: 4px; }
.cm-gate h3 { font: 700 1.35rem/1.25 var(--display); }
.cm-gate p { max-width: 430px; color: var(--ink2); font-weight: 500; line-height: 1.55; }
.cm-gate .btn { margin-top: 8px; }

html.big .cm-head__title { font-size: 1.45rem; }
@media (prefers-reduced-motion: reduce) {
  .cm-typing i, .cm-skel i { animation: none; }
}
