/* =====================================================================
   assets/community.css — /community (9 Nov 2026, owner notes 6 and 26)
   On top of assets/pages-ui.css (the Classic page kit tokens: day = .cp, night = html.dark .cp).
   Its own look: a warm "planet lounge" — a glowing orb, rooms like lit doors, chat bubbles with a soft
   violet-to-cyan edge for the creator. Light on weak phones: no blur on the list, motion only on transform/opacity.
   ===================================================================== */
.cm { --cm-h: calc(100vh - 210px); }
.cm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; margin: 4px 0 14px; }
.cm-title { display: flex; align-items: center; gap: 14px; }
.cm-orb { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff 0 6%, var(--brand) 26%, #2a1a7a 72%); box-shadow: 0 0 0 4px var(--brand-soft), 0 10px 26px -10px var(--brand); }
.cm-orb i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); top: 50%; left: 50%; margin: -4px; animation: cmOrbit 6s linear infinite; }
.cm-orb i:nth-child(2) { background: var(--l); box-shadow: 0 0 10px var(--l); animation-duration: 9s; animation-direction: reverse; }
.cm-orb i:nth-child(3) { width: 5px; height: 5px; margin: -2.5px; background: #fff; animation-duration: 4.5s; }
@keyframes cmOrbit { from { transform: rotate(0) translateX(34px); } to { transform: rotate(360deg) translateX(34px); } }
.cm-kick { margin: 0; font: 700 10.5px/1 var(--lab-font); letter-spacing: .18em; text-transform: uppercase; color: var(--brand-ink); }
.cm-title h1 { margin: 2px 0 0; font-size: clamp(26px, 5vw, 34px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.cm-sub { margin: 2px 0 0; color: var(--mute); font-size: 14px; }
.cm-online { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 700; }
.cm-online .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: cmPulse 2s infinite; }
@keyframes cmPulse { 0% { box-shadow: 0 0 0 0 rgba(15,157,110,.5); } 70% { box-shadow: 0 0 0 8px rgba(15,157,110,0); } 100% { box-shadow: 0 0 0 0 rgba(15,157,110,0); } }

.cm-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
/* rooms */
.cm-rooms { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 76px; }
.cm-room { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.cm-room:hover { transform: translateY(-1px); border-color: var(--brand); }
.cm-room .em { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sub); font-size: 18px; }
.cm-room .tx { display: flex; flex-direction: column; min-width: 0; }
.cm-room b { font-size: 14.5px; } .cm-room small { color: var(--mute); font-size: 12px; line-height: 1.3; }
.cm-room.on { border-color: var(--brand); background: linear-gradient(120deg, var(--brand-soft), var(--card) 75%); box-shadow: inset 3px 0 0 var(--brand); }
.cm-room.on .em { background: var(--brand); }
.cm-room .new { position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px var(--card); }
.cm-rules { padding: 10px 12px; border-radius: 14px; background: var(--gold-soft); color: var(--body); font-size: 13px; }
.cm-rules summary { cursor: pointer; font-weight: 800; color: var(--gold-txt); }
.cm-rules ul { margin: 8px 0 0; padding-left: 18px; } .cm-rules li { margin: 3px 0; }

/* the chat */
.cm-chat { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); min-height: 420px; height: var(--cm-h); overflow: hidden; }
.cm-chat-h { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cm-chat-h .em { font-size: 22px; } .cm-chat-h h2 { margin: 0; font-size: 16px; color: var(--ink); } .cm-chat-h p { margin: 0; color: var(--mute); font-size: 12.5px; }
.cm-pins { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; background: var(--gold-soft); border-bottom: 1px solid var(--line); }
.cm-pin { text-align: left; border: 0; background: none; color: var(--body); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 0; }
.cm-pin b { color: var(--gold-txt); }
.cm-list { flex: 1; overflow-y: auto; padding: 14px 14px 44px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px, var(--sub); }   /* 13 Nov 2026: a quiet dotted wall; room at the bottom for the bar of the last message */
.cm-day { align-self: center; margin: 6px 0; } .cm-day span { font-size: 11.5px; font-weight: 700; color: var(--mute); background: var(--sub); padding: 4px 10px; border-radius: 999px; }
.cm-older { align-self: center; border: 1px solid var(--line); background: var(--card); color: var(--brand-ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }

/* ── 13 Nov 2026 (owner): THE NEW MESSAGE DESIGN ─────────────────────────────────────────────────────────────
   Your own messages: on the right, in the brand colour, no picture. Other people: a white card with their picture and a
   coloured name. Messages one after another from the same person are joined. The time sits small at the bottom of the
   bubble, the reactions hang on its lower edge, and the buttons (React · Reply · Edit · Delete · ⋯) are a small bar right
   under the bubble: the mouse on the message shows it (computer), a tap on the message shows it (phone). */
.cm { --cm-me-ink: #fff; }
html.dark .cm { --cm-me-ink: #0a0820; }
.cm-msg { position: relative; display: flex; gap: 8px; align-items: flex-start; max-width: min(80%, 620px); margin-top: 8px; animation: cmIn .2s ease-out both; }
.cm-msg.cont { margin-top: -7px; }
.cm-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.cm-msg:focus-within { z-index: 4; }
.cm-av { flex: none; width: 36px; height: 36px; } .cm-av > * { width: 36px !important; height: 36px !important; }
.cm-msg.me > .cm-av { display: none; }
.cm-msg.cont > .cm-av { height: 0; }
.cm-col { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.cm-msg.me .cm-col { align-items: flex-end; }
.cm-bub { position: relative; min-width: 0; max-width: 100%; padding: 7px 12px 5px; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(18,16,46,.06); }
html.dark .cm-bub { background: rgba(255,255,255,.06); box-shadow: none; }
.cm-msg.cont .cm-bub { border-radius: 6px 18px 18px 6px; }
.cm-msg.me .cm-bub { border-radius: 18px 18px 6px 18px; background: var(--cm-mine); border-color: transparent; color: var(--cm-me-ink); }
.cm-msg.me.cont .cm-bub { border-radius: 18px 6px 6px 18px; }
.cm-msg.creator .cm-bub { background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(120deg, var(--brand), var(--l), var(--gold)) border-box; border: 1.5px solid transparent; }
.cm-msg.creator.me .cm-bub { background: linear-gradient(var(--cm-mine-c), var(--cm-mine-c)) padding-box, linear-gradient(120deg, var(--gold), var(--l), var(--gold)) border-box; }
.cm-msg.gone .cm-bub, .cm-msg.gone.me .cm-bub { background: none; border: 1px dashed var(--line); box-shadow: none; color: var(--mute); }
.cm-msg.pinned .cm-bub { box-shadow: 0 0 0 2px var(--gold-soft); }
.cm-msg.flash .cm-bub { animation: cmFlash 1.5s ease-out; }
.cm-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 2px; font-size: 12.5px; }
.cm-who b { color: var(--brand-ink); font-size: 13px; font-weight: 800; }
.cm-who .cm-n0 { color: var(--brand-ink); } .cm-who .cm-n1 { color: var(--l-ink); } .cm-who .cm-n2 { color: var(--w-ink); } .cm-who .cm-n3 { color: var(--s-ink); } .cm-who .cm-n4 { color: var(--ok); } .cm-who .cm-n5 { color: var(--r-ink); }
html.dark .cm-who .cm-n1 { color: var(--l); } html.dark .cm-who .cm-n2 { color: var(--w); } html.dark .cm-who .cm-n3 { color: var(--s); } html.dark .cm-who .cm-n5 { color: var(--r); }
.cm-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.cm-badge.creator { background: linear-gradient(120deg, var(--gold), #ffdf8a); color: #4a3200; }
.cm-badge.mod { background: var(--l-soft); color: var(--l-ink); } .cm-badge.teacher { background: var(--ok-soft); color: var(--ok); }
.cm-txt { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
.cm-txt a { color: var(--brand-ink); text-decoration: underline; }
.cm-txt.del { color: var(--mute); font-style: italic; font-size: 13.5px; }
.cm-meta { display: flex; justify-content: flex-end; gap: 5px; margin: 2px -2px 0 0; font-size: 10.5px; line-height: 1.3; color: var(--mute); white-space: nowrap; }
.cm-meta span { font-style: italic; }
.cm-msg.me .cm-txt, .cm-msg.me .cm-txt a, .cm-msg.me .cm-voice small { color: var(--cm-me-ink); }
.cm-msg.me .cm-meta { color: var(--cm-me-ink); opacity: .78; }
.cm-msg.me .cm-at { background: rgba(255,255,255,.24); color: var(--cm-me-ink); }
.cm-msg.me .cm-quote { background: rgba(255,255,255,.2); border-left-color: var(--cm-me-ink); color: var(--cm-me-ink); }
.cm-msg.me .cm-quote b { color: var(--cm-me-ink); }
.cm-msg.gone.me .cm-txt, .cm-msg.gone.me .cm-meta { color: var(--mute); opacity: 1; }
/* 10 Nov 2026 (owner): the team's "Remove" button on a "This message was deleted" line */
.cm-wipe { margin-left: 8px; padding: 3px 10px; min-height: 28px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--bad, #B42318); font: inherit; font-style: normal; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.cm-wipe:hover { background: var(--sub); }
.cm-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; margin: 2px 0 5px; padding: 5px 9px; border: 0; border-left: 3px solid var(--brand); border-radius: 6px; background: var(--sub); color: var(--body); font: inherit; font-size: 12.5px; cursor: pointer; }
.cm-quote b { color: var(--brand-ink); font-size: 12px; } .cm-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }
/* reactions: small chips on the lower edge of the bubble */
.cm-rx { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -5px 8px 0; }
.cm-msg.me .cm-rx { justify-content: flex-end; }
.cm-rx button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 1px 8px; min-height: 24px; font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 1px 2px rgba(18,16,46,.08); }
html.dark .cm-rx button { background: #1b1d3a; }
.cm-rx button.mine { border-color: var(--brand); background: var(--brand-soft); }
html.dark .cm-rx button.mine { background: #2c2760; }
.cm-rx b { font-size: 11.5px; }
.cm-rx .who { color: var(--brand-ink); font-size: 11.5px; font-weight: 700; border-style: dashed; }
.cm-rx .cm-seen { margin: 0; box-shadow: none; }
.cm-rxh { margin: 10px 0 2px; font-size: 14px; font-weight: 800; color: var(--ink); } .cm-rxh span { font-size: 20px; vertical-align: -2px; }
/* 21 Nov 2026: a button only the keyboard finds (Tab); it opens the message menu */
.cm-kb { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.cm-kb:focus-visible { clip: auto; width: 30px; height: 30px; margin: 0; top: 2px; right: -34px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--brand); color: var(--brand-ink); }
.cm-msg.me .cm-kb:focus-visible { right: auto; left: -34px; }
.cm-msg.cm-picked { z-index: 4; }
.cm-msg.cm-picked .cm-bub { box-shadow: 0 0 0 2px var(--brand); }   /* the message whose menu is open; nothing changes size */
.cm-list { touch-action: manipulation; }   /* a quick second tap does not zoom the page */
@media (hover: none) { .cm-bub { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }   /* a phone: a press opens the menu (Copy text is in it), not the text selection */

.cm-wait { align-self: center; display: flex; gap: 6px; margin: auto; }
.cm-wait span { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); opacity: .35; animation: cmDot 1s infinite; }
.cm-wait span:nth-child(2) { animation-delay: .15s; } .cm-wait span:nth-child(3) { animation-delay: .3s; }
.cm-empty { margin: auto; text-align: center; color: var(--mute); } .cm-empty div { font-size: 44px; }
.cm-guest { margin: auto; max-width: 440px; text-align: center; padding: 20px; }
.cm-guest-art { font-size: 54px; } .cm-guest h2 { margin: 6px 0; color: var(--ink); } .cm-guest p { color: var(--body); }
.cm-down { position: absolute; right: 16px; bottom: 84px; z-index: 3; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 13px; box-shadow: var(--shadow-up); cursor: pointer; }
html.dark .cm-down { color: #0a0820; }

/* writing */
.cm-compose { border-top: 1px solid var(--line); padding: 10px 12px 12px; background: var(--card); }
.cm-compose.off { opacity: .8; }
.cm-replying { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 10px; border-left: 3px solid var(--brand); border-radius: 6px; background: var(--brand-soft); font-size: 13px; color: var(--body); }
.cm-replying span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-replying button { border: 0; background: none; color: var(--mute); font-size: 20px; cursor: pointer; line-height: 1; }
.cm-note { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--sub); color: var(--body); font-size: 13.5px; }
.cm-note.bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.cm-row { display: flex; gap: 8px; align-items: flex-end; }
.cm-row textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 140px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--sub); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.35; }
.cm-row textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.cm-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .12s; }
html.dark .cm-send { color: #0a0820; }
.cm-send:active { transform: scale(.94); } .cm-send:disabled { opacity: .45; cursor: default; }
/* 10 Nov 2026 (owner): voice messages — the microphone button, the recording bar, the player in a message */
.cm-send[hidden], .cm-row[hidden], .cm-rec[hidden] { display: none; }
.cm-rec { display: flex; align-items: center; gap: 10px; min-height: 46px; }
.cm-rec-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--body); font-size: 24px; line-height: 1; cursor: pointer; }
.cm-rec-x:hover { border-color: var(--bad); color: var(--bad); }
.cm-rec-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--bad); animation: cm-rec 1s ease-in-out infinite; }
.cm-rec.done .cm-rec-dot { animation: none; opacity: .45; }
@keyframes cm-rec { 50% { opacity: .25; } }
.cm-rec-t { flex: none; max-width: 60%; font-weight: 700; font-size: 14.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cm-rec.done .cm-rec-t { flex: 1; max-width: none; font-size: 13.5px; }
.cm-rec-bar { flex: 1; min-width: 20px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.cm-rec-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--bad); }
.cm-rec.done .cm-rec-bar { display: none; }
.cm-voice { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cm-voice audio { width: min(260px, 62vw); height: 40px; }
.cm-voice small { flex: none; font-size: 12px; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .cm-rec-dot { animation: none; } }

/* 9 Nov 2026 (owner, round 2): photos, @mentions, search, "Seen by" (owner only), unread numbers on the rooms */
.cm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cm-room .new:not(:empty) { width: auto; height: auto; min-width: 20px; padding: 0 6px; font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; color: #fff; text-align: center; border-radius: 99px; top: 8px; }
.cm-tool { position: relative; flex: none; width: 44px; height: 46px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--card); color: var(--body); display: grid; place-items: center; cursor: pointer; font: 800 18px/1 Inter, system-ui, sans-serif; transition: border-color .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.cm-tool:hover, .cm-tool:focus-within { border-color: var(--brand); color: var(--brand-ink); }
.cm-tool:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.cm-photo-chip { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 6px 8px 6px 6px; border-radius: 12px; background: var(--sub); border: 1px solid var(--line); font-size: 13px; color: var(--body); }
.cm-photo-chip img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.cm-photo-chip span { flex: 1; min-width: 0; }
.cm-photo-chip button { border: 0; background: none; color: var(--mute); font-size: 22px; cursor: pointer; line-height: 1; width: 34px; height: 34px; }
.cm-img { display: block; margin: 4px 0 6px; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; max-width: 260px; }
.cm-img img { display: block; width: 100%; max-height: 300px; object-fit: cover; background: var(--line2); border-radius: 12px; }
.cm-at { color: var(--brand-ink); background: var(--brand-soft); border-radius: 6px; padding: 0 3px; font-weight: 700; }
.cm-msg.mention .cm-bub { box-shadow: 0 0 0 2px var(--gold-fill); }
.cm-msg.mention .cm-bub::before { content: "@ you"; display: inline-block; margin: 0 0 3px; padding: 1px 7px; border-radius: 99px; background: var(--gold-soft); color: var(--gold-txt); font-size: 10.5px; font-weight: 800; }
.cm-seen { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--mute); font: 600 11.5px/1.6 Inter, system-ui, sans-serif; cursor: pointer; }
.cm-seen b { color: var(--ink); }
.cm-seen:hover { border-color: var(--brand); color: var(--brand-ink); }
.cm-sug { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-up); max-width: 320px; }
.cm-sug button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 600 14px/1.2 Inter, system-ui, sans-serif; text-align: left; cursor: pointer; }
.cm-sug button.on, .cm-sug button:hover { background: var(--brand-soft); }
.cm-sug .cm-av, .cm-seenl .cm-av { width: 28px; height: 28px; flex: none; overflow: hidden; border-radius: 50%; }
.cm-sug .cm-av > *, .cm-seenl .cm-av > * { width: 28px !important; height: 28px !important; font-size: 12px !important; }
.cm-sbtn { margin-left: auto; flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--body); display: grid; place-items: center; cursor: pointer; }
.cm-sbtn[aria-expanded="true"], .cm-sbtn:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.cm-search { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cm-search input { width: 100%; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--sub); color: var(--ink); font: inherit; font-size: 16px; }
.cm-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.cm-sres { max-height: 50vh; overflow-y: auto; padding: 6px 10px 10px; border-bottom: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.cm-sres-i { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line2); background: var(--sub); color: var(--ink); font: inherit; cursor: pointer; }
.cm-sres-i:hover { border-color: var(--brand); }
.cm-sres-i .r { font-size: 11.5px; color: var(--mute); font-weight: 600; }
.cm-sres-i b { font-size: 13px; } .cm-sres-i .t { font-size: 13.5px; color: var(--body); overflow-wrap: anywhere; }
.cm-sres-i mark { background: var(--gold-soft); color: var(--gold-txt); border-radius: 3px; padding: 0 2px; }
.cm-sres-none { margin: 8px 4px; color: var(--mute); font-size: 13.5px; }
.cm-sheet { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(4,6,20,.6); }
.cm-sheet[hidden], .cm-sres[hidden], .cm-sug[hidden], .cm-photo-chip[hidden], .cm-search[hidden] { display: none; }
.cm-sheet-in { width: min(420px, 100%); max-height: 80vh; overflow-y: auto; border-radius: 18px; background: var(--card); color: var(--ink); border: 1px solid var(--line); padding: 14px 16px 16px; box-shadow: var(--shadow-up); }
.cm-sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 16px; }
.cm-sheet-h button, .cm-photo button { border: 0; background: var(--sub); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.cm-sheet-note { margin: 0 0 8px; font-size: 12px; color: var(--mute); }
.cm-sheet-empty { margin: 6px 0; color: var(--mute); }
.cm-seenl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cm-seenl li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line2); font-size: 14px; }
.cm-seenl time { margin-left: auto; color: var(--mute); font-size: 12px; white-space: nowrap; }
.cm-photo { position: relative; max-width: min(960px, 100%); max-height: 90vh; }
.cm-photo img { display: block; max-width: 100%; max-height: 90vh; border-radius: 12px; }
.cm-photo button { position: absolute; top: 8px; right: 8px; }
@media (max-width: 760px) { .cm-tool { width: 40px; height: 44px; } .cm-row { gap: 6px; } .cm-img { max-width: 220px; } }

/* the menu of a message (21 Nov 2026, like Telegram): the reactions in a row on top, the list under it */
.cm-menu { position: fixed; z-index: 90; display: flex; flex-direction: column; gap: 6px; align-items: stretch; width: max-content; max-width: calc(100vw - 16px); color: var(--ink); animation: cmMx .14s ease-out; }
@keyframes cmMx { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.cm-mx-rx, .cm-mx-box { background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 32px -10px rgba(18,16,46,.35), 0 2px 6px rgba(18,16,46,.08); }
html.dark .cm-mx-rx, html.dark .cm-mx-box { background: #1b1d3a; box-shadow: 0 12px 32px -8px rgba(0,0,0,.6); }
.cm-mx-rx { display: flex; gap: 2px; padding: 4px; border-radius: 999px; align-self: flex-start; }
.cm-mx-rx button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; font-size: 22px; line-height: 1; cursor: pointer; transition: transform .12s; -webkit-tap-highlight-color: transparent; }
.cm-mx-rx button:hover, .cm-mx-rx button:focus-visible { transform: scale(1.22); outline: none; }
.cm-mx-rx button.mine { background: var(--brand-soft); }
.cm-mx-box { min-width: 220px; padding: 5px; border-radius: 14px; }
.cm-mx-box > button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cm-mx-box > button svg { flex: none; width: 18px; height: 18px; color: var(--mute); }
.cm-mx-box > button:hover, .cm-mx-box > button:focus-visible { background: var(--sub); outline: none; }
.cm-mx-box > button.bad, .cm-mx-box > button.bad svg { color: var(--bad); }
.cm-mx-box > button.bad:hover, .cm-mx-box > button.bad:focus-visible { background: var(--bad-soft); }
.cm-mx-sep { display: block; height: 1px; margin: 4px 8px; background: var(--line); }
@media (hover: none) { .cm-mx-box > button { padding: 11px 14px; font-size: 15px; } .cm-mx-rx button { width: 40px; height: 40px; } }
@media (max-width: 380px) { .cm-mx-rx button { width: 34px; height: 34px; font-size: 20px; } }

@keyframes cmIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cmDot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes cmFlash { 0% { box-shadow: 0 0 0 4px var(--gold); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* phones: rooms become a row of chips above the chat */
@media (max-width: 860px) {
  .cm { --cm-h: calc(100vh - 230px); }
  .cm-shell { grid-template-columns: 1fr; }
  .cm-rooms { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .cm-rooms::-webkit-scrollbar { display: none; }
  .cm-room { flex: none; padding: 7px 12px; align-items: center; border-radius: 999px; }
  .cm-room .em { width: auto; height: auto; background: none !important; font-size: 16px; }
  .cm-room small { display: none; } .cm-room b { font-size: 13.5px; white-space: nowrap; }
  .cm-room .new { top: 4px; right: 6px; }
  .cm-rules { display: none; }
  .cm-msg { max-width: 90%; }
  .cm-head { margin-bottom: 10px; } .cm-orb { width: 44px; height: 44px; } .cm-sub { display: none; }
}
@media (max-width: 760px) {
  .cm { --cm-h: calc(100vh - 290px); }
  .cm-chat { border-radius: 16px; min-height: 300px; } .cm-down { bottom: 78px; }
  .cm-head { flex-wrap: nowrap; align-items: center; margin: 0 0 10px; } .cm-kick { display: none; }
  .cm-title { gap: 10px; } .cm-orb { width: 34px; height: 34px; } .cm-orb i { animation-name: cmOrbitS; } .cm-title h1 { font-size: 23px; margin: 0; }
  .cm-online { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
  .cm-chat-h { padding: 9px 14px; } .cm-chat-h p { display: none; }
}
@keyframes cmOrbitS { from { transform: rotate(0) translateX(22px); } to { transform: rotate(360deg) translateX(22px); } }
@supports (height: 100dvh) { .cm { --cm-h: calc(100dvh - 210px); } @media (max-width: 860px) { .cm { --cm-h: calc(100dvh - 230px); } } @media (max-width: 760px) { .cm { --cm-h: calc(100dvh - 290px); } } }
@media (prefers-reduced-motion: reduce) { .cm-orb i, .cm-online .dot, .cm-msg, .cm-wait span { animation: none; } .cm-room, .cm-send, .cm-mx-rx button { transition: none; } .cm-menu { animation: none; } }
html.lk-lite .cm-orb i, html.lk-lite .cm-online .dot, html.lk-lite .cm-msg { animation: none; }

/* =====================================================================
   21 Nov 2026 (owner: "fix all the shortages … Telegram can be a model") — the rooms list, the full-screen chat on a phone,
   "N unread messages", page cards, member cards, the paper-clip sheet and the page picker. Day and night use the kit's tokens.
   ===================================================================== */
.cm-sheet[hidden], .cm-card-chip[hidden], .cm-typing[hidden] { display: none; }
.cm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* rooms: the newest message and its time (computer: the left column; phone: the whole screen) */
.cm-room .tx { flex: 1; }
.cm-room .top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cm-room .tm { font-size: 11.5px; color: var(--mute); white-space: nowrap; font-weight: 600; }
.cm-room small[data-ls] { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cm-room .new { position: static; align-self: center; width: auto; height: 22px; min-width: 22px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: var(--brand); color: #fff; box-shadow: none;
  font: 700 12px/22px var(--lab-font, inherit); text-align: center; font-style: normal; }
.cm-room .new:empty { width: 10px; min-width: 10px; height: 10px; padding: 0; background: var(--bad); }
/* the chat's head */
.cm-back { display: none; width: 40px; height: 40px; margin-left: -6px; border-radius: 12px; place-items: center; color: var(--ink); text-decoration: none; }
.cm-back:hover { background: var(--sub); }
.cm-chat-t { flex: 1; min-width: 0; }
.cm-chat-h p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-chat-h p.typing { color: var(--brand-ink); font-weight: 700; }
html.dark .cm-chat-h p.typing { color: var(--brand); }
.cm-unread { align-self: stretch; text-align: center; margin: 8px -14px; padding: 4px 0; background: var(--brand-soft); }
.cm-unread span { font-size: 12px; font-weight: 800; color: var(--brand-ink); }
html.dark .cm-unread span { color: var(--ink); }
/* a picture or a name opens the member's card */
button.cm-av { border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
button.cm-av:focus-visible, .cm-nb:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.cm-letter { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff !important; font-weight: 800; font-size: 15px; background: var(--brand); }
.cm-letter.cm-n0 { background: #6d4ee0; } .cm-letter.cm-n1 { background: #0b7fa8; } .cm-letter.cm-n2 { background: #b4235f; } .cm-letter.cm-n3 { background: #a35a00; } .cm-letter.cm-n4 { background: #0f7a56; } .cm-letter.cm-n5 { background: #5235b8; }
.cm-nb { border: 0; padding: 0; background: none; font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.cm-nb:hover { text-decoration: underline; }
/* page cards (a link to a page of IELTS Planet) */
.cm-card { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 2px; padding: 12px 13px; border-radius: 14px; text-decoration: none !important; color: #fff !important; min-width: 220px; max-width: 340px;
  background: linear-gradient(150deg, var(--c1), var(--c2)); position: relative; overflow: hidden; }
.cm-card::after { content: ""; position: absolute; right: -22px; top: -22px; width: 96px; height: 96px; border-radius: 50%; border: 14px solid rgba(255,255,255,.09); pointer-events: none; }
.cm-card-top { display: flex; flex-direction: column; gap: 2px; }
.cm-card-k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.cm-card b { font-size: 17px; line-height: 1.25; }
.cm-card-s { font-size: 12.5px; opacity: .92; }
.cm-card-x { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.2); }
.cm-card-x span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .95; }
.cm-card-go { align-self: flex-start; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.18); font-weight: 800; font-size: 13px; }
.cm-card:hover .cm-card-go { background: rgba(255,255,255,.28); }
.cm-card.k-r { --c1: #123b33; --c2: #0f7a56; } .cm-card.k-l { --c1: #073b52; --c2: #0a6c8f; } .cm-card.k-w { --c1: #5a0e33; --c2: #a3155a; }
.cm-card.k-s { --c1: #2e1a6e; --c2: #5235b8; } .cm-card.k-g { --c1: #5c3800; --c2: #8a5b00; } .cm-card.k-v { --c1: #2f1a85; --c2: #5b3ed0; }
.cm-card.k-a { --c1: #4a1020; --c2: #b4235f; } .cm-card.k-p { --c1: #2a1a7a; --c2: #6d4ee0; }
.cm-card-chip { position: relative; padding: 0 12px 8px; }
.cm-card-chip .cm-card { margin: 0; max-width: none; padding-right: 48px; } .cm-card-chip .cm-card-x { display: none; }
.cm-card-chip > button { position: absolute; top: 8px; right: 20px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.25); color: #fff; font-size: 20px; cursor: pointer; }
/* visitors */
.cm-guestbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: var(--card); }
.cm-guestbar p { flex: 1 1 100%; margin: 0; font-size: 13.5px; color: var(--body); }
/* search: this room or all rooms */
.cm-search { display: flex; align-items: center; gap: 10px; }
.cm-search input[type=search] { flex: 1; }
.cm-sroom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--body); white-space: nowrap; min-height: 40px; }
/* sheets: member card, report, paper clip, page picker */
.cm-sheet-in .cm-wait { padding: 20px 0; }
.cm-prof-top { display: flex; gap: 14px; align-items: center; margin: 8px 0 12px; }
.cm-prof-av { position: relative; flex: none; width: 64px; height: 64px; }
.cm-prof-av > *, .cm-prof-av .cm-letter { width: 64px !important; height: 64px !important; font-size: 24px; border-radius: 50%; }
.cm-prof-av i.on { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 3px solid var(--card); }
.cm-prof-n { margin: 0; font-size: 19px; font-weight: 800; color: var(--ink); }
.cm-prof-s { margin: 2px 0 0; font-size: 13px; color: var(--mute); } .cm-prof-s .ok { color: var(--ok); }
.cm-prof-tags { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cm-prof-tags .t-band { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: var(--l-soft, #e0f6ff); color: var(--l-ink, #006f94); }
.cm-prof-st { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.cm-prof-st p { margin: 0; padding: 10px 6px; border-radius: 14px; background: var(--sub); text-align: center; }
.cm-prof-st b { display: block; font-size: 20px; color: var(--ink); } .cm-prof-st span { font-size: 12px; color: var(--mute); font-weight: 600; }
.cm-prof-act { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cm-prof-act > * { flex: 1 1 130px; min-height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--brand-ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
html.dark .cm-prof-act > * { color: var(--ink); }
.cm-prof-act .bad { color: var(--bad); }
.cm-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cm-opts label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14.5px; cursor: pointer; }
.cm-lab { display: block; font-size: 12.5px; font-weight: 700; color: var(--mute); margin: 4px 0 6px; }
.cm-in { width: 100%; box-sizing: border-box; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sub); color: var(--ink); font: inherit; font-size: 15px; }
.cm-big { width: 100%; min-height: 48px; margin-top: 12px; border: 0; border-radius: 14px; background: var(--brand); color: #fff; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.cm-big.bad { background: var(--bad); }
.cm-attach { display: flex; flex-direction: column; gap: 8px; }
.cm-attach button { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; min-height: 60px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.cm-attach button:hover { border-color: var(--brand); }
.cm-attach .i { grid-row: span 2; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 800; background: var(--brand-soft); color: var(--brand-ink); }
.cm-attach b { font-size: 15px; } .cm-attach small { font-size: 12.5px; color: var(--mute); }
.cm-pick { width: min(460px, 100%); }
.cm-pages { display: flex; flex-direction: column; margin-top: 8px; max-height: 56vh; overflow-y: auto; }
.cm-page { display: flex; gap: 12px; align-items: center; min-height: 58px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.cm-page:hover { background: var(--sub); }
.cm-page .i { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(150deg, var(--c1, #2a1a7a), var(--c2, #6d4ee0)); }
.cm-page.k-r { --c1: #123b33; --c2: #0f7a56; } .cm-page.k-l { --c1: #073b52; --c2: #0a6c8f; } .cm-page.k-w { --c1: #5a0e33; --c2: #a3155a; } .cm-page.k-s { --c1: #2e1a6e; --c2: #5235b8; }
.cm-page.k-g { --c1: #5c3800; --c2: #8a5b00; } .cm-page.k-v { --c1: #2f1a85; --c2: #5b3ed0; } .cm-page.k-a { --c1: #4a1020; --c2: #b4235f; }
.cm-page .tx { display: flex; flex-direction: column; min-width: 0; } .cm-page b { font-size: 14.5px; } .cm-page small { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── PHONES: the rooms list OR one room, full screen (like Telegram) ── */
@media (max-width: 760px) {
  .cm-back { display: grid; }
  .cm-shell > * { min-width: 0; }
  .cm.v-list .cm-room .tx { min-width: 0; overflow: hidden; }
  .cm.v-list .cm-chat { display: none; }
  .cm.v-list .cm-rooms { flex-direction: column; overflow: visible; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 0; }
  .cm.v-list .cm-room { border: 0; border-radius: 0; padding: 12px 14px; align-items: center; background: none; box-shadow: none; border-bottom: 1px solid var(--line); flex: none; }
  .cm.v-list .cm-room:last-of-type { border-bottom: 0; }
  .cm.v-list .cm-room .em { width: 50px; height: 50px; border-radius: 16px; background: var(--brand-soft) !important; font-size: 24px; }
  .cm.v-list .cm-room small { display: block; font-size: 13.5px; }
  .cm.v-list .cm-room b { font-size: 15.5px; }
  .cm.v-list .cm-room.on .em { background: var(--brand-soft) !important; }
  .cm.v-list .cm-rules { display: block; margin-top: 10px; }
  .cm.v-chat .cm-head, .cm.v-chat .cm-rooms { display: none; }
  .cm.v-chat .cm-chat { position: fixed; top: var(--cm-top, 55px); bottom: var(--cm-bot, 60px); left: 0; right: 0; height: auto; min-height: 0; z-index: 40; border: 0; border-radius: 0; box-shadow: none; }
  .cm.v-chat .cm-chat-h { padding: 6px 10px; }
  .cm.v-chat .cm-chat-h .em { font-size: 20px; }
  .cm.v-chat .cm-chat-h p { display: block; }
  .cm.v-chat .cm-down { bottom: 74px; }
  .cm-card { min-width: 0; max-width: 100%; }
  .cm-sheet { place-items: end stretch; padding: 0; }
  .cm-sheet-in { width: 100%; max-height: 86vh; border-radius: 22px 22px 0 0; padding-bottom: 22px; }
  .cm-sheet .cm-photo { align-self: center; }
}
html.cm-full, html.cm-full body { overflow: hidden; overscroll-behavior: none; }

/* ── 21 Nov 2026: the AI helper (includes/community_ai.php) — its own violet look, so nobody mistakes it for a person ── */
.cm-ai-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: conic-gradient(from 210deg, #7c3aed, #2563eb, #06b6d4, #7c3aed); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.cm-badge.ai { background: #ede9fe; color: #5b21b6; }
html.dark .cm-badge.ai { background: rgba(167,139,250,.18); color: #c4b5fd; }
.cm-msg.ai .cm-bub { background: linear-gradient(160deg, #f5f3ff, var(--card) 70%); border: 1px solid #ddd6fe; }
html.dark .cm-msg.ai .cm-bub { background: linear-gradient(160deg, rgba(124,58,237,.16), var(--card) 70%); border-color: rgba(167,139,250,.3); }
.cm-msg.ai .cm-who b { color: #6d28d9; }
html.dark .cm-msg.ai .cm-who b { color: #c4b5fd; }
.cm-aifb { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
.cm-aifb button { min-height: 32px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.cm-aifb button b { margin-left: 2px; }
.cm-aifb button.on { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }
html.dark .cm-aifb button.on { background: rgba(167,139,250,.2); border-color: rgba(167,139,250,.45); color: #ddd6fe; }
.cm-aifb button:focus-visible, .cm-pills button:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }
.cm-attach .i.i-ai { background: #ede9fe; color: #6d28d9; }
html.dark .cm-attach .i.i-ai { background: rgba(167,139,250,.2); color: #ddd6fe; }
/* "Reply with AI" */
.cm-aid-q { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2, rgba(0,0,0,.04)); border-left: 3px solid #7c3aed; font-size: 14px; }
.cm-aid-q span { white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-pills button { min-height: 36px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.cm-pills button[aria-checked="true"] { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.cm-aid-tr { margin: 12px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--brand-soft); font-size: 13.5px; overflow-wrap: anywhere; }
.cm-aid-t { min-height: 140px; resize: vertical; line-height: 1.45; }
.cm-aid #cm-aid-go { background: linear-gradient(120deg, #7c3aed, #2563eb); }
.cm-aid #cm-aid-go.ghost { background: none; border: 1.5px solid #7c3aed; color: #6d28d9; }
html.dark .cm-aid #cm-aid-go.ghost { color: #c4b5fd; border-color: #a78bfa; }
.cm-big.ok { background: var(--ok, #16a34a); }
.cm-big:disabled { opacity: .6; cursor: wait; }

/* ── 21 Nov 2026: polls and quizzes, best answer, saved, mentions, topics, ✓✓, forward, swipe, welcome (includes/community_more.php) ── */
.cm-mine { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cm-mine-b { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.cm-mine-b .em { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; flex: none; }
.cm-mine-b:hover { border-color: var(--brand); }
@media (max-width: 860px) { .cm-mine { display: none; } }
@media (max-width: 760px) { .cm.v-list .cm-mine { display: grid; margin-top: 10px; } }
.cm-minelist { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow-y: auto; }
/* topics of IELTS help */
.cm-topics { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.cm-topics::-webkit-scrollbar { display: none; }
.cm-topics button { flex: none; min-height: 34px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cm-topics button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cm-tag { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .86em; font-weight: 700; white-space: nowrap; }
.cm-msg.me .cm-tag { background: rgba(255,255,255,.22); color: var(--cm-me-ink); }
/* polls and quizzes */
.cm-poll { min-width: min(280px, 62vw); }
.cm-poll-k { margin: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: var(--mute); }
.cm-poll-q { margin: 2px 0 8px; font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.cm-opt { position: relative; display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; min-height: 40px; margin-top: 6px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; overflow: hidden; isolation: isolate; }
.cm-opt:hover:not(:disabled) { border-color: var(--brand); }
.cm-opt.done::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pc); background: var(--brand-soft); z-index: -1; transition: width .5s ease; }
.cm-opt.mine { border-color: var(--brand); font-weight: 700; }
.cm-opt.right { border-color: var(--ok); } .cm-opt.right::before { background: var(--ok-soft); }
.cm-opt.right .t::after { content: " ✓"; color: var(--ok); font-weight: 800; }
.cm-opt.wrong { border-color: var(--bad); } .cm-opt.wrong .t::after { content: " ✗"; color: var(--bad); font-weight: 800; }
.cm-opt:disabled { cursor: default; color: var(--ink); }
.cm-opt .n { font-weight: 800; font-size: 13px; }
.cm-poll-why { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--gold-soft); color: var(--body); font-size: 13.5px; }
.cm-poll-f { margin: 6px 0 0; font-size: 12px; color: var(--mute); }
.cm-msg.me .cm-poll-k, .cm-msg.me .cm-poll-f { color: var(--cm-me-ink); opacity: .85; }
@media (prefers-reduced-motion: reduce) { .cm-opt.done::before { transition: none; } }
/* best answer */
.cm-best { margin: 6px 0 0; display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 800; }
.cm-solved { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--ok); background: var(--ok-soft); color: var(--ok); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.cm-msg.me .cm-best, .cm-msg.me .cm-solved { background: rgba(255,255,255,.9); color: #0f7a56; border-color: transparent; }
/* ✓ sent  ✓✓ read */
.cm-tick { letter-spacing: -2px; font-weight: 800; }
.cm-tick.read { color: #7dd3fc; }
html.dark .cm-tick.read { color: #0369a1; }
/* forwarded message card */
.cm-card.k-c { --c1: #1f2937; --c2: #475569; }
/* swipe to reply */
.cm-msg { transition: transform .18s ease; }
.cm-msg.swipe .cm-bub { box-shadow: 0 0 0 2px var(--brand); }
@media (prefers-reduced-motion: reduce) { .cm-msg { transition: none; } }
/* the poll maker, the welcome */
.cm-pq-r { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.cm-pq-r input[type=radio] { display: none; width: 20px; height: 20px; flex: none; }
.cm-pq.quiz .cm-pq-r input[type=radio] { display: block; }
.cm-pq-add { margin-top: 8px; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px dashed var(--line); background: none; color: var(--brand-ink); font: inherit; font-weight: 700; cursor: pointer; }
.cm-pq-quiz { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; }
.cm-attach .i.i-poll { background: var(--gold-soft); color: var(--ink); }
.cm-welcome { margin: 0; font-size: 15px; line-height: 1.55; }

/* ── 21 Nov 2026: THE CHAT LOOK — the colour of your own messages, the effects, the 🎨 picker (backgrounds: community-looks.css) ── */
.cm { --cm-mine: var(--brand); --cm-mine-c: var(--brand); }
.cm[data-mc="ocean"], [data-mc="ocean"] { --cm-mine: #0b7fc4; --cm-mine-c: #0b7fc4; }
.cm[data-mc="emerald"], [data-mc="emerald"] { --cm-mine: #0f8a62; --cm-mine-c: #0f8a62; }
.cm[data-mc="sunset"], [data-mc="sunset"] { --cm-mine: linear-gradient(135deg, #f97316, #db2777); --cm-mine-c: #e8486a; }
.cm[data-mc="violet"], [data-mc="violet"] { --cm-mine: var(--brand, #6d4ee0); --cm-mine-c: var(--brand, #6d4ee0); }
html.dark .cm[data-mc="ocean"], html.dark [data-mc="ocean"] { --cm-mine: #38bdf8; --cm-mine-c: #38bdf8; }
html.dark .cm[data-mc="emerald"], html.dark [data-mc="emerald"] { --cm-mine: #34d399; --cm-mine-c: #34d399; }
html.dark .cm[data-mc="sunset"], html.dark [data-mc="sunset"] { --cm-mine: linear-gradient(135deg, #fb923c, #f472b6); --cm-mine-c: #f6789a; }
.cm-sbtn + .cm-sbtn { margin-left: 6px; }
/* the effects */
.cm-msg.fly { animation: cmFly .38s cubic-bezier(.2,.9,.3,1.2) both; transform-origin: 100% 100%; }
@keyframes cmFly { from { opacity: 0; transform: translateY(26px) scale(.86); } }
.cm-burst { position: fixed; z-index: 96; pointer-events: none; font-size: 20px; line-height: 1; animation: cmBurst .9s ease-out forwards; }
@keyframes cmBurst { to { transform: translate(var(--dx), var(--dy)) scale(.4) rotate(var(--r)); opacity: 0; } }
html.lk-lite .cm-msg.fly, html.lk-lite .cm-burst { animation: none; display: none; }
@media (prefers-reduced-motion: reduce) { .cm-msg.fly { animation: none; } .cm-burst { display: none; } }
/* the picker */
.cm-lk .cm-lk-h { margin: 14px 0 8px; font-size: 14px; color: var(--ink); }
.cm-lk-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cm-lk-o { display: block; padding: 0; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); overflow: hidden; cursor: pointer; font: inherit; text-align: center; -webkit-tap-highlight-color: transparent; }
.cm-lk-o[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cm-lk-th { position: relative; display: block; height: 66px; }
.cm-lk-th i { position: absolute; left: 6px; top: 10px; width: 60%; height: 12px; border-radius: 7px 7px 7px 3px; background: var(--card); box-shadow: 0 1px 2px rgba(18,16,46,.18); }
html.dark .cm-lk-th i { background: #1b2148; }
.cm-lk-th i + i { left: auto; right: 6px; top: 32px; width: 46%; border-radius: 7px 7px 3px 7px; background: var(--cm-mine, var(--brand)); }
.cm-lk-o b { display: block; padding: 5px 3px 7px; font-size: 11.5px; line-height: 1.2; font-weight: 700; }
.cm-lk-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-lk-sw { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cm-lk-sw i { width: 22px; height: 22px; border-radius: 50%; background: var(--cm-mine); }
.cm-lk-sw[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.cm-lk-fx { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; cursor: pointer; }
.cm-lk-fx input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.cm-lk-fx b { display: block; font-size: 14px; } .cm-lk-fx small { color: var(--mute); font-size: 12.5px; }
.cm-lk-reset { margin-top: 12px; width: 100%; min-height: 42px; border-radius: 12px; border: 1px dashed var(--line); background: none; color: var(--brand-ink); font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 380px) { .cm-lk-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── 21 Nov 2026 (owner: "apply all … help me to organize the phone style better") ── */
/* a message on its way (🕓) and one that could not go (tap to try again) */
.cm-msg.cm-pend .cm-bub { opacity: .78; }
.cm-clock { font-size: 11px; }
.cm-retry { border: 0; background: rgba(255,255,255,.92); color: var(--bad); border-radius: 999px; padding: 2px 9px; font: 700 11.5px/1.6 Inter, system-ui, sans-serif; cursor: pointer; }
.cm-msg.cm-fail .cm-bub { opacity: 1; box-shadow: 0 0 0 2px var(--bad); }
/* ✍️ check my English */
.cm-chk { font-size: 18px; }
.cm-chk[hidden] { display: none; }
.cm-chk:disabled { opacity: .5; cursor: wait; }
.cm-chk-l { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cm-chk-l li { padding: 9px 11px; border-radius: 12px; background: var(--sub); font-size: 14.5px; line-height: 1.45; }
.cm-chk-l .from { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.cm-chk-l .to { color: var(--ok); font-weight: 800; }
.cm-chk-l small { display: block; margin-top: 2px; color: var(--mute); font-size: 12.5px; }
.cm-chk-better { margin: 0 0 6px; padding: 11px 13px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); font-size: 15px; line-height: 1.5; }
.cm-chk-ok { margin: 6px 0 12px; font-size: 15px; }
.cm-chk-a { display: flex; gap: 8px; } .cm-chk-a .cm-big { flex: 1; } 
.cm-ghost { flex: 1; min-height: 48px; margin-top: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
/* 🌐 translate */
.cm-tr .cm-pills { margin: 4px 0 10px; }
.cm-tr .cm-pills button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cm-tr-src { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--mute); font-size: 13.5px; white-space: pre-wrap; }
.cm-tr-t { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--sub); font-size: 15.5px; line-height: 1.5; color: var(--ink); }
/* 🏅 helper of the week */
.cm-badge.hw { background: linear-gradient(120deg, #ffe9a8, #ffd166); color: #4a3200; }
/* 🔔 / 🔕 a room */
#cm-mutebtn .off { display: none; } #cm-mutebtn.is-muted .on { display: none; } #cm-mutebtn.is-muted .off { display: inline; }
.cm-room.muted .new { background: var(--mute) !important; }
.cm-room.muted .new:empty { display: none; }
.cm-room.muted b::after { content: " 🔕"; font-size: .8em; }
/* select several messages */
.cm-selbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--brand-soft); }
.cm-selbar[hidden] { display: none; }
.cm-selbar b { flex: 1; font-size: 14px; color: var(--ink); }
.cm-selbar button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.cm-selbar button[data-sel="x"] { width: 36px; padding: 0; font-size: 20px; }
.cm-selbar button.bad { color: var(--bad); } .cm-selbar button[hidden] { display: none; } .cm-selbar button:disabled { opacity: .5; }
.cm.cm-selecting .cm-msg[data-id] { cursor: pointer; }
.cm.cm-selecting .cm-msg[data-id]::before { content: ""; flex: none; align-self: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); order: -1; }
.cm.cm-selecting .cm-msg.me[data-id]::before { order: 3; }
.cm.cm-selecting .cm-msg.cm-chosen::before { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.cm.cm-selecting .cm-msg.cm-chosen .cm-bub { box-shadow: 0 0 0 2px var(--brand); }
/* the reactions row holds 10 now */
@media (max-width: 420px) { .cm-mx-rx { gap: 0; padding: 3px; } .cm-mx-rx button { width: 31px; height: 34px; font-size: 19px; } }
/* 🔔 phone notifications card in the rooms list */
.cm-push { margin-top: 8px; padding: 12px 14px !important; gap: 8px 12px !important; }
.cm-push .pc-ic { font-size: 22px !important; }
.cm-push .pc-t b { font-size: 14px !important; } .cm-push .pc-t span { font-size: 12.5px !important; }
/* the room's ⋯ (phones only) */
.cm-hmore { display: none; }
.cm-hm { display: flex; flex-direction: column; gap: 8px; }
.cm-hm button { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 22px; text-align: left; cursor: pointer; }
.cm-hm span { display: flex; flex-direction: column; } .cm-hm b { font-size: 15px; } .cm-hm small { font-size: 12.5px; color: var(--mute); }

/* ── THE PHONE (owner: "organize the phone style better") ──
   rooms list: a calm Telegram-like list; Saved and Mentions as two small chips above it.
   a room: the WHOLE screen (the site's top bar and bottom menu step aside; the ← in the room's head goes back),
   the head carries ←, the room, 🔍 and ⋯; the message box sits right above the keyboard. */
@media (max-width: 760px) {
  #cm-lkbtn, #cm-mutebtn { display: none; }
  .cm-hmore { display: grid; }
  .cm-chat-h .cm-sbtn { width: 38px; height: 38px; border: 0; background: none; }
  .cm-chat-h .cm-sbtn + .cm-sbtn { margin-left: 0; }
  .cm.v-list .cm-head { margin: 2px 0 10px; }
  .cm.v-list .cm-mine { display: flex; gap: 8px; margin: 0 0 10px; order: -1; }
  .cm.v-list .cm-mine-b { flex: 1; min-height: 40px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; justify-content: center; }
  .cm.v-list .cm-mine-b .em { width: 22px; height: 22px; border-radius: 7px; font-size: 13px; }
  .cm.v-list .cm-rooms { gap: 0; }
  .cm.v-list .cm-room { padding: 11px 14px; gap: 12px; }
  .cm.v-list .cm-room .em { width: 48px; height: 48px; border-radius: 50%; font-size: 23px; }
  .cm.v-list .cm-room .tm { font-size: 12px; }
  .cm.v-list .cm-room b { font-size: 15.5px; color: var(--ink); }
  .cm.v-list .cm-room small[data-ls] { color: var(--mute); font-size: 13.5px; }
  html.cm-full .lk-top, html.cm-full .lk-bottom, html.cm-full .lk-foot { display: none !important; }
  html.cm-full .cm.v-chat .cm-chat { top: var(--cm-vt, 0px); bottom: auto; height: var(--cm-vh, 100vh); padding-top: env(safe-area-inset-top); z-index: 60; }
  @supports (height: 100dvh) { html.cm-full .cm.v-chat .cm-chat { height: var(--cm-vh, 100dvh); } }
  html.cm-full .cm.v-chat .cm-compose { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  html.cm-full .cm.v-chat .cm-chat-h { min-height: 56px; padding: 6px 6px 6px 8px; gap: 8px; }
  html.cm-full .cm.v-chat .cm-chat-h h2 { font-size: 16.5px; }
  html.cm-full .cm.v-chat .cm-chat-h .em { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); font-size: 18px; }
  .cm-row { gap: 6px; }
  .cm-chk { width: 40px; }
}
