/* Community (/community/, 2026-11-09): channels with one conversation each. Uses assets/lmi.css; classes start with cm-.
   Layout as redesign/community-mockup.html: channels on the left, the conversation on the right; phones show the channel
   list first, then one channel full screen. */
html, body.cm-page { height: 100%; }
body.cm-page { display: flex; flex-direction: column; }
.cm { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.cm-side { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.cm-side h1 { font: 600 22px var(--ff-display); padding: 16px 18px 8px; }
.cm-chans { list-style: none; margin: 0; padding: 4px 8px 12px; overflow-y: auto; }
.cm-chans .cm-wait { padding: 8px 10px; color: var(--fg2); font-size: 14px; }
.cm-chans .cm-sep { padding: 14px 10px 4px; font-size: 12px; font-weight: 700; color: var(--fg2); letter-spacing: .04em; text-transform: uppercase; }
.cm-chans a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--fg2); text-decoration: none; }
.cm-chans a:hover { background: var(--soft); text-decoration: none; }
.cm-chans a.on { background: var(--chip); color: var(--fg); font-weight: 600; }
.cm-chans a.unread { color: var(--fg); font-weight: 700; }
.cm-chans .hash { width: 16px; text-align: center; font-weight: 400; color: var(--fg2); }
.cm-chans .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-chans .cnt { background: var(--acc); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.cm-chans .cnt.at { background: var(--me); }

.cm-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cm-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--card); flex: none; }
.cm-back { display: none; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 6px 0 0; color: var(--fg); }
.cm-ttl { min-width: 0; }
.cm-ttl h2 { font: 600 18px var(--ff-display); }
.cm-ttl p { font-size: 13px; color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cm-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0 14px; }
.cm-older { display: block; margin: 6px auto 4px; border: 1px solid var(--line2); background: var(--card); border-radius: 999px; padding: 4px 14px; font-size: 13px; color: var(--fg2); cursor: pointer; }
.cm-empty { padding: 30px 18px; text-align: center; color: var(--fg2); }
.cm-day { text-align: center; margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--fg2); }
.cm-new { display: flex; align-items: center; gap: 10px; margin: 10px 18px; color: var(--acc-ink); font-size: 12px; font-weight: 700; }
.cm-new::before, .cm-new::after { content: ''; flex: 1; height: 1px; background: var(--acc); opacity: .5; }
.cm-msg { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; padding: 4px 18px; }
.cm-msg:hover { background: var(--soft); }
.cm-msg > *:not(.cm-av):not(.cm-tools) { grid-column: 2; }
.cm-msg.cont { padding-top: 1px; }
.cm-msg.cont .cm-av, .cm-msg.cont .cm-who { display: none; }
.cm-msg.cont > *:not(.cm-tools) { grid-column: 2; }
.cm-msg.mentioned { background: var(--current); box-shadow: inset 3px 0 0 var(--acc); }
.cm-msg.flash { background: var(--chip); }
.cm-msg.removed .cm-text { opacity: .5; text-decoration: line-through; }
.cm-av { grid-column: 1; grid-row: 1 / span 5; align-self: start; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; overflow: hidden; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; }
.cm-who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cm-who a { font-weight: 700; color: var(--fg); text-decoration: none; }
.cm-who .badge { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--chip); color: var(--acc-ink); }
.cm-who time { font-size: 12px; color: var(--fg2); }
.cm-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.cm-text .ed { font-size: 12px; color: var(--fg2); white-space: nowrap; }
.cm-note { font-size: 12px; color: var(--bad); }
.cm-mention { background: var(--me-soft); color: var(--me); font-weight: 600; border-radius: 4px; padding: 0 3px; text-decoration: none; }
.cm-mention.you { background: var(--chip); color: var(--acc-ink); }
.cm-chlink { color: var(--acc-ink); font-weight: 600; text-decoration: none; }
.cm-spoiler { background: var(--fg); color: transparent; border-radius: 4px; padding: 0 3px; cursor: pointer; }
.cm-spoiler.open { background: var(--soft); color: inherit; cursor: default; }
.cm-quote { display: flex; gap: 8px; font-size: 13px; color: var(--fg2); margin: 2px 0 4px; padding: 4px 8px; border-left: 3px solid var(--line2); background: var(--soft); border-radius: 6px; cursor: pointer; max-width: 560px; }
.cm-quote b { color: var(--fg); white-space: nowrap; }
.cm-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-reacts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.cm-reacts button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 1px 8px; font-size: 13px; cursor: pointer; color: var(--fg); }
.cm-reacts button.mine { border-color: var(--acc); background: var(--chip); }
.cm-reacts button b { font-weight: 600; margin-left: 3px; }
.cm-tools { position: absolute; right: 16px; top: -12px; display: none; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); z-index: 2; }
.cm-msg:hover .cm-tools, .cm-msg.show-tools .cm-tools { display: flex; }
.cm-tools button { border: 0; background: none; height: 30px; min-width: 32px; padding: 0 6px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--fg); }
.cm-tools button:hover { background: var(--soft); }

.cm-compose { flex: none; padding: 10px 18px 14px; border-top: 1px solid var(--line); background: var(--card); position: relative; }
.cm-replying { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg2); margin-bottom: 6px; }
.cm-replying button { margin-left: auto; border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--fg2); }
.cm-box { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--line2); border-radius: 14px; padding: 6px 6px 6px 12px; background: var(--bg); }
.cm-box:focus-within { border-color: var(--acc); }
.cm-box textarea { flex: 1; border: 0; outline: 0; background: none; resize: none; min-height: 24px; max-height: 160px; padding: 4px 0; line-height: 1.45; font-size: 16px; }
.cm-send { border: 0; background: var(--acc); color: #fff; width: 40px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 16px; flex: none; }
.cm-send:disabled { opacity: .4; cursor: default; }
.cm-hint { font-size: 12px; color: var(--fg2); margin-top: 6px; }
.cm-ro { font-size: 14px; color: var(--fg2); text-align: center; padding: 6px; }
.cm-pop { position: absolute; left: 18px; bottom: 100%; margin-bottom: 4px; width: min(320px, calc(100% - 36px)); max-height: 300px; overflow-y: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 4px; z-index: 5; }
.cm-pop div { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cm-pop div.act { background: var(--soft); }
.cm-pop .mini { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; overflow: hidden; flex: none; }
.cm-pop .mini img { width: 100%; height: 100%; object-fit: cover; }
.cm-pop small { color: var(--fg2); margin-left: auto; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-picker { position: absolute; display: flex; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 6px; gap: 2px; z-index: 6; }
.cm-picker[hidden] { display: none; }
.cm-picker button { border: 0; background: none; font-size: 20px; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
.cm-picker button:hover { background: var(--soft); }

/* contest channels (step 2) */
.cm-chans a.cm-ct { align-items: flex-start; }
.cm-chans a.cm-ct .name { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.cm-chans a.cm-ct small { display: block; font-size: 12px; font-weight: 400; color: var(--fg2); }
.cm-chans a.cm-ct small.live { color: var(--ok); font-weight: 600; }
.cm-ttl p a { color: var(--acc-ink); }
.cm-held { font-size: 14px; color: var(--fg2); background: var(--soft); border-radius: 8px; padding: 5px 10px; justify-self: start; }
.cm-who .badge.kind { background: var(--me-soft); color: var(--me); }
.cm-msg.announce { background: var(--current); }
.cm-anon { font-weight: 700; color: var(--fg2); }
.cm-anonrow { display: flex; justify-content: flex-end; margin-top: 6px; }
.cm-anonbtn { border: 1px solid var(--line2); background: var(--card); color: var(--fg); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.cm-anonbtn:disabled { opacity: .45; cursor: default; }

/* tagged contests and Expo puzzles (step 3) */
.cm-tag { background: var(--chip); color: var(--acc-ink); font-weight: 600; border-radius: 4px; padding: 0 4px; text-decoration: none; }
.cm-cards { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; max-width: 460px; }
.cm-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 10px; color: var(--fg); text-decoration: none; }
.cm-card:hover { border-color: var(--acc); text-decoration: none; }
.cm-card .ic { font-size: 20px; flex: none; }
.cm-card .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-card small { font-size: 12px; color: var(--fg2); }
.cm-card small.you { color: var(--acc-ink); font-weight: 600; }
.cm-card .live { color: var(--ok); font-weight: 600; }
.cm-card .go { flex: none; background: var(--acc); color: #fff; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 12px; }
.cm-blurnote { justify-self: start; border: 0; background: var(--soft); color: var(--fg2); font-size: 12px; border-radius: 999px; padding: 2px 10px; margin: 2px 0; cursor: pointer; }
.cm-text.blur { filter: blur(5px); user-select: none; cursor: pointer; }
.cm-pop div.hd { font-size: 11px; font-weight: 700; color: var(--fg2); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px 2px; cursor: default; }
.cm-pop .tg { flex: none; }
.cm-pop .lb { min-width: 0; display: flex; flex-direction: column; }
.cm-pop .lb small { margin-left: 0; }

@media (max-width: 760px) {
  .cm { grid-template-columns: 1fr; }
  .cm.in-chan .cm-side { display: none; }
  .cm:not(.in-chan) .cm-main { display: none; }
  .cm-back { display: block; }
  .cm-msg { padding: 4px 12px; grid-template-columns: 34px minmax(0, 1fr); gap: 0 10px; }
  .cm-av { width: 34px; height: 34px; font-size: 12px; }
  .cm-compose { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .cm-hint { display: none; }
  .cm-tools { right: 8px; }
}
