/* =====================================================================
   Community module: hub, doubt forum, alumni, webinars (public night
   theme) and study buddy, batch groups, class chat (student area).
   Tokens come from ph-theme.css / ph-student.css.
   ===================================================================== */
.cm-muted { color: var(--ph-muted); }
.cm-h3 { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; margin: 0 0 12px; color: var(--ph-white, #fff); }
.cm-h3 .icon { width: 18px; height: 18px; color: var(--ph-magenta); }
.cm-sec-h { font-size: 1.15rem; margin: 36px 0 14px; color: var(--ph-ink); }
.cm-card { border: 1px solid var(--ph-line); background: var(--ph-surface); border-radius: 10px; padding: 18px; min-width: 0; }
.cm-card + .cm-card, .cm-card + .btn, .btn + .cm-card { margin-top: 14px; }
.cm-go { width: 18px; height: 18px; color: var(--ph-muted); flex: none; transition: transform .2s ease; }
.cm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cm-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid var(--ph-line2); border-radius: 4px; font-size: .8rem; color: var(--ph-text); background: transparent; line-height: 1.4; text-decoration: none; }
a.cm-tag:hover { border-color: var(--ph-magenta); color: var(--ph-ink); }
.cm-tag.is-hot { border-color: rgba(225, 28, 242, .55); color: #F5B8FF; }
.cm-tag.is-match { border-color: rgba(46, 211, 138, .5); color: var(--ph-green); }
.cm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--ph-line2); border-radius: 6px; color: var(--ph-ink); font-size: .88rem; text-decoration: none; }
.cm-chip:hover { border-color: var(--ph-magenta); }
.cm-chip .icon { width: 16px; height: 16px; }
.cm-check { display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; cursor: pointer; min-height: 32px; }
.cm-check input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ph-magenta, #C514D9); }
.cm-textarea { min-height: 150px; resize: vertical; }
.cm-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.cm-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--ph-surface3); color: var(--ph-ink); font-weight: 700; font-size: .85rem; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; }
.cm-senior { display: inline-block; margin-left: 6px; padding: 1px 6px; border: 1px solid rgba(255, 201, 74, .55); border-radius: 4px; color: var(--ph-yellow); font-size: .72rem; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.cm-solved { display: inline-flex; align-items: center; gap: 4px; color: var(--ph-green); font-weight: 600; }
.cm-solved .icon { width: 15px; height: 15px; }
.cm-rules { margin: 0; padding-left: 18px; color: var(--ph-text); font-size: .9rem; line-height: 1.6; }
.cm-rules li + li { margin-top: 6px; }
.cm-related { list-style: none; margin: 0; padding: 0; }
.cm-related li + li { border-top: 1px solid var(--ph-line); }
.cm-related a { display: flex; gap: 10px; padding: 10px 0; color: var(--ph-text); text-decoration: none; font-size: .92rem; line-height: 1.4; }
.cm-related a:hover { color: var(--ph-ink); }
.cm-related small { display: block; color: var(--ph-muted); font-size: .8rem; }
.cm-related-n { flex: none; min-width: 32px; height: 26px; display: grid; place-items: center; border: 1px solid var(--ph-line2); border-radius: 4px; font-size: .8rem; color: var(--ph-muted); }

/* ---------- Hub ---------- */
.cm-hub { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.cm-hub-lead { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border: 1px solid var(--ph-line2); border-radius: 12px; background: var(--ph-surface); text-decoration: none; color: var(--ph-text); }
.cm-hub-lead:hover .cm-go, .cm-hub-row:hover .cm-go, .cm-wb-list a:hover .cm-go { transform: translateX(3px); color: var(--ph-magenta); }
.cm-hub-lead-t { flex: 1; min-width: 0; display: grid; gap: 6px; }
.cm-hub-lead-t strong { font-size: clamp(1.2rem, 2.4vw, 1.5rem); color: var(--ph-ink); }
.cm-hub-lead-t span { line-height: 1.6; max-width: 62ch; }
.cm-hub-lead-t small { color: var(--ph-muted); }
.cm-hub-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--ph-line2); color: var(--ph-magenta); }
.cm-hub-ic .icon { width: 22px; height: 22px; }
.cm-recent { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--ph-line); margin-left: 22px; }
.cm-recent a { display: flex; gap: 14px; align-items: center; padding: 12px 0; color: var(--ph-text); text-decoration: none; border-bottom: 1px solid var(--ph-line); }
.cm-recent a:hover .cm-recent-t { color: var(--ph-ink); }
.cm-recent-n { flex: none; width: 52px; text-align: center; font-weight: 700; color: var(--ph-ink); line-height: 1.1; }
.cm-recent-n small { display: block; font-weight: 400; font-size: .72rem; color: var(--ph-muted); }
.cm-recent-n.is-solved { color: var(--ph-green); }
.cm-recent-t { min-width: 0; overflow-wrap: anywhere; }
.cm-recent-t small { display: block; color: var(--ph-muted); font-size: .8rem; margin-top: 2px; }
.cm-hub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0 44px; }
.cm-hub-rows { margin-top: 32px; border-top: 1px solid var(--ph-line); }
.cm-hub-row { display: flex; gap: 16px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--ph-line); text-decoration: none; color: var(--ph-text); }
.cm-hub-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 4px; line-height: 1.55; }
.cm-hub-row strong { color: var(--ph-ink); font-size: 1.05rem; }
.cm-hub-side { display: grid; gap: 14px; align-content: start; }
.cm-hub-side .cm-card + .cm-card { margin-top: 0; }
.cm-next { display: flex; gap: 14px; padding: 16px; border: 1px solid rgba(225, 28, 242, .45); border-radius: 10px; background: var(--ph-surface); text-decoration: none; color: var(--ph-text); }
.cm-next-date, .cm-wb-date { flex: none; width: 56px; text-align: center; border-right: 1px solid var(--ph-line); padding-right: 12px; line-height: 1.1; }
.cm-next-date b, .cm-wb-date b { display: block; font-size: 1.6rem; color: var(--ph-ink); }
.cm-next-date small, .cm-wb-date small { color: var(--ph-muted); font-size: .8rem; }
.cm-next-t { min-width: 0; display: grid; gap: 3px; }
.cm-next-t small { color: var(--ph-magenta); font-weight: 600; font-size: .8rem; }
.cm-next-t strong { color: var(--ph-ink); line-height: 1.35; }
.cm-next-t span { color: var(--ph-muted); font-size: .85rem; }
.cm-group { padding: 10px 0; border-top: 1px solid var(--ph-line); }
.cm-group:first-of-type { border-top: 0; padding-top: 0; }
.cm-group strong { display: block; color: var(--ph-ink); font-size: .95rem; }
.cm-group small { color: var(--ph-muted); }
.cm-group-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- Forum ---------- */
.cm-forum { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.cm-forum-main { min-width: 0; }
.cm-forum-side { display: grid; gap: 14px; align-content: start; }
.cm-forum-side .cm-card + .cm-card, .cm-forum-side .btn + .cm-card { margin-top: 0; }
.cm-search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 14px; }
.cm-search .input, .cm-search .select, .cm-filter .select, .cm-chat-form .input, .cm-send .input { font-size: 16px; }
.cm-search .btn { justify-content: center; min-height: 46px; }
.cm-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ph-line); margin-bottom: 4px; overflow-x: auto; }
.cm-tabs a { padding: 10px 14px; color: var(--ph-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.cm-tabs a:hover { color: var(--ph-ink); }
.cm-tabs a.active { color: var(--ph-ink); border-bottom-color: var(--ph-magenta); font-weight: 600; }
.cm-qlist { list-style: none; margin: 0 0 20px; padding: 0; }
.cm-q { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--ph-line); }
.cm-q-stats { flex: none; width: 64px; display: grid; gap: 6px; align-content: start; text-align: center; }
.cm-q-stats span { display: block; padding: 4px 0; font-size: .72rem; color: var(--ph-muted); line-height: 1.2; border-radius: 4px; }
.cm-q-stats b { display: block; font-size: 1.05rem; color: var(--ph-text); }
.cm-q-stats .has-ans { border: 1px solid var(--ph-line2); }
.cm-q-stats .is-solved { border: 1px solid rgba(46, 211, 138, .55); color: var(--ph-green); }
.cm-q-stats .is-solved b { color: var(--ph-green); }
.cm-q-main { min-width: 0; flex: 1; }
.cm-q-main h2 { font-size: 1.05rem; line-height: 1.4; margin: 0 0 6px; overflow-wrap: anywhere; }
.cm-q-main h2 a { color: var(--ph-ink); text-decoration: none; }
.cm-q-main h2 a:hover { color: #F5B8FF; }
.cm-q-main p { margin: 0 0 10px; color: var(--ph-muted); font-size: .92rem; line-height: 1.55; overflow-wrap: anywhere; }
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .82rem; color: var(--ph-muted); }
.cm-by { color: var(--ph-text); }
.cm-post { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--ph-line); }
.cm-post-q { padding-top: 0; }
.cm-post.is-accepted { border: 1px solid rgba(46, 211, 138, .45); border-radius: 10px; padding: 18px 16px; margin: 12px 0; }
.cm-post-body { flex: 1; min-width: 0; }
.cm-meta-top { margin-bottom: 12px; }
.cm-text { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.75; color: var(--ph-text); font-size: 1rem; max-width: 75ch; }
.cm-img { display: inline-block; margin-top: 14px; border: 1px solid var(--ph-line); border-radius: 8px; overflow: hidden; max-width: 100%; }
.cm-img img { display: block; max-width: 100%; height: auto; max-height: 480px; object-fit: contain; }
.cm-post-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 16px; }
.cm-post-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.cm-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cm-author small { display: block; color: var(--ph-muted); font-size: .78rem; }
.cm-author strong { color: var(--ph-ink); font-size: .92rem; overflow-wrap: anywhere; }
.cm-accepted { display: inline-flex; align-items: center; gap: 6px; color: var(--ph-green); font-weight: 600; font-size: .88rem; margin-bottom: 8px; }
.cm-accepted .icon { width: 16px; height: 16px; }
.cm-vote { flex: none; width: 52px; display: grid; justify-items: center; gap: 2px; align-content: start; text-align: center; }
.cm-vote form { margin: 0; }
.cm-vote-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--ph-line2); border-radius: 8px; background: transparent; color: var(--ph-text); cursor: pointer; transition: border-color .15s, color .15s, background-color .15s; }
.cm-vote-btn .icon { width: 20px; height: 20px; }
.cm-vote-btn:hover { border-color: var(--ph-magenta); color: var(--ph-ink); }
.cm-vote-btn:focus-visible { outline: 2px solid var(--ph-magenta); outline-offset: 2px; }
.cm-vote-btn.is-on { background: rgba(225, 28, 242, .16); border-color: var(--ph-magenta); color: #F5B8FF; }
.cm-vote-btn.is-off { opacity: .4; cursor: default; }
.cm-vote b { font-size: 1.1rem; color: var(--ph-ink); }
.cm-vote small { font-size: .7rem; color: var(--ph-muted); }
.cm-answers-h { font-size: 1.1rem; margin: 26px 0 0; color: var(--ph-ink); }
.cm-noans { margin: 16px 0; }
.cm-answer-form { margin-top: 28px; }
.cm-login { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cm-login p { margin: 0; }
.cm-report summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 6px; color: var(--ph-muted); font-size: .82rem; cursor: pointer; }
.cm-report summary::-webkit-details-marker { display: none; }
.cm-report summary .icon { width: 14px; height: 14px; }
.cm-report summary:hover { color: var(--ph-ink); }
.cm-report-form { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid var(--ph-line2); border-radius: 8px; background: var(--ph-bg2); width: min(320px, 100%); font-size: .85rem; }
.cm-report-form .select, .cm-report-form .input { font-size: 16px; }
.cm-ask { min-width: 0; }

/* ---------- Alumni ---------- */
.cm-alumni-empty { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.cm-alumni-empty-t > .icon { width: 40px; height: 40px; color: var(--ph-magenta); }
.cm-alumni-empty-t h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); color: var(--ph-ink); margin: 12px 0; line-height: 1.25; }
.cm-alumni-empty-t p { line-height: 1.7; max-width: 60ch; }
.cm-al-form h3 { margin: 0 0 14px; font-size: 1.1rem; color: var(--ph-ink); }
.cm-geo { border: 1px solid var(--ph-line); border-radius: 12px; background: var(--ph-surface); padding: 20px; margin-bottom: 24px; }
.cm-geo-sum { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--ph-line); }
.cm-geo-sum p { margin: 0; color: var(--ph-muted); }
.cm-geo-sum b { font-size: 1.5rem; color: var(--ph-ink); margin-right: 4px; }
.cm-geo-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.cm-geo-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ph-line); color: var(--ph-text); text-decoration: none; min-height: 44px; }
.cm-geo-row span { min-width: 0; overflow-wrap: anywhere; }
.cm-geo-row small { display: block; color: var(--ph-muted); font-size: .8rem; }
.cm-geo-row b { color: var(--ph-ink); }
.cm-geo-row i { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--w, 0); background: var(--ph-grad); }
.cm-geo-row.is-sub { padding-left: 16px; font-size: .9rem; color: var(--ph-muted); min-height: 36px; }
a.cm-geo-row:hover, .cm-geo-row.active { color: var(--ph-ink); }
.cm-geo-row.active span { font-weight: 700; }
.cm-filter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 12px; margin-bottom: 18px; align-items: end; }
.cm-filter .field { margin-bottom: 8px; }
.cm-filter-go { display: flex; gap: 8px; margin-bottom: 8px; }
.cm-alumni { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--ph-line); margin-bottom: 20px; }
.cm-al { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--ph-line); min-width: 0; }
.cm-al-ph { width: 72px; height: 72px; flex: none; border-radius: 8px; overflow: hidden; background: var(--ph-surface3); display: grid; place-items: center; color: var(--ph-ink); font-weight: 700; font-size: 1.2rem; }
.cm-al-ph img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.cm-al-t { min-width: 0; }
.cm-al-t h3 { margin: 0 0 2px; font-size: 1.02rem; color: var(--ph-ink); }
.cm-al-t p { margin: 0; overflow-wrap: anywhere; }
.cm-al-pos { color: #F5B8FF; font-size: .92rem; }
.cm-al-inst { color: var(--ph-text); font-size: .92rem; }
.cm-al-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--ph-muted); font-size: .82rem; margin-top: 6px !important; }
.cm-al-meta .icon { width: 13px; height: 13px; }
.cm-al blockquote { margin: 10px 0 0; padding-left: 12px; border-left: 2px solid var(--ph-magenta); color: var(--ph-text); font-size: .9rem; line-height: 1.6; }
.cm-alumni-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--ph-line); }
.cm-alumni-add h2 { font-size: 1.3rem; color: var(--ph-ink); margin: 0 0 8px; }

/* ---------- Webinars ---------- */
.cm-wb-lead { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--ph-line2); border-radius: 12px; background: var(--ph-surface); overflow: hidden; text-decoration: none; color: var(--ph-text); }
.cm-wb-when { padding: 20px; border-bottom: 1px solid var(--ph-line); display: grid; gap: 2px; align-content: center; }
.cm-wb-when small { color: var(--ph-magenta); font-weight: 600; }
.cm-wb-when b { font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1; color: var(--ph-ink); }
.cm-wb-when span { color: var(--ph-muted); }
.cm-wb-lead-t { padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.cm-wb-lead-t h2 { margin: 0; font-size: clamp(1.25rem, 2.8vw, 1.7rem); line-height: 1.3; color: var(--ph-ink); overflow-wrap: anywhere; }
.cm-wb-lead-t p { margin: 0; line-height: 1.65; max-width: 62ch; }
.cm-wb-lead-t .btn { justify-self: start; }
.cm-speaker { display: flex; align-items: center; gap: 10px; }
.cm-speaker small { display: block; color: var(--ph-muted); font-size: .8rem; }
.cm-speaker strong { color: var(--ph-ink); }
.cm-speaker-lg { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ph-line); }
.cm-speaker-lg .cm-av { width: 64px; height: 64px; font-size: 1.1rem; }
.cm-speaker-lg span > span { display: block; color: var(--ph-text); font-size: .9rem; }
.cm-wb-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ph-line); }
.cm-wb-list a { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ph-line); color: var(--ph-text); text-decoration: none; }
.cm-wb-t { flex: 1; min-width: 0; }
.cm-wb-t strong { display: block; color: var(--ph-ink); overflow-wrap: anywhere; }
.cm-wb-t small { color: var(--ph-muted); }
.cm-wb-past { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: 20px; }
.cm-wb-card { display: grid; text-decoration: none; color: var(--ph-text); border: 1px solid var(--ph-line); border-radius: 10px; overflow: hidden; background: var(--ph-surface); }
.cm-wb-card:hover { border-color: var(--ph-line2); }
.cm-wb-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--ph-bg2); display: grid; place-items: center; color: var(--ph-muted); }
.cm-wb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cm-wb-thumb > .icon { width: 32px; height: 32px; }
.cm-wb-thumb em { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: rgba(10, 1, 24, .85); border-radius: 4px; font-style: normal; font-size: .78rem; color: var(--ph-ink); }
.cm-wb-thumb em .icon { width: 12px; height: 12px; }
.cm-wb-card-t { padding: 14px; display: grid; gap: 4px; }
.cm-wb-card-t small, .cm-wb-card-t span { color: var(--ph-muted); font-size: .82rem; }
.cm-wb-card-t strong { color: var(--ph-ink); line-height: 1.4; }
.cm-player { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--ph-line); margin-bottom: 22px; background: #000; }
.cm-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cm-reg { display: grid; gap: 12px; }
.cm-reg form .input { font-size: 16px; }
.cm-reg-when { display: flex; gap: 10px; align-items: flex-start; }
.cm-reg-when .icon { width: 22px; height: 22px; color: var(--ph-magenta); flex: none; margin-top: 2px; }
.cm-reg-when strong { display: block; color: var(--ph-ink); }
.cm-reg-when small { color: var(--ph-muted); }
.cm-reg-ok { display: flex; gap: 8px; align-items: center; color: var(--ph-green); font-weight: 600; }
.cm-reg-ok .icon { width: 18px; height: 18px; flex: none; }
.cm-wb-detail aside > * + * { margin-top: 14px; }

/* ---------- Student area: batch groups, study buddy, class chat ---------- */
.cm-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--ph-line); border-radius: 10px; background: var(--ph-surface); }
.cm-groups-l { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--ph-ink); font-weight: 600; font-size: .92rem; }
.cm-groups-l .icon { width: 18px; height: 18px; color: var(--ph-magenta); }
.cm-groups .tbtn { min-height: 40px; border: 1px solid var(--ph-line2); background: transparent; color: var(--ph-ink); }
.cm-groups .tbtn:hover { border-color: var(--ph-magenta); }
.cm-groups .cm-g-whatsapp .icon { color: #25D366; }
.cm-groups .cm-g-telegram .icon { color: #29A9EB; }
.cm-groups .cm-g-facebook .icon { color: #5B8DEF; }
.cm-groups .cm-g-discord .icon { color: #8C9EFF; }
.cm-st-empty { text-align: center; padding: 36px 18px; }
.cm-st-empty > .icon { width: 36px; height: 36px; color: var(--ph-magenta); }
.cm-buddy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.cm-buddy-main { display: grid; gap: 18px; min-width: 0; }
.cm-buddy-main .panel, .cm-buddy-form { margin: 0; }
.cm-buddy-form .input, .cm-buddy-form .select, .cm-buddy-form .textarea { font-size: 16px; }
.cm-subjects { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.cm-subjects legend { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; color: var(--ink); }
.cm-subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 4px 12px; max-height: 240px; overflow-y: auto; padding: 8px; border: 1px solid var(--ph-line); border-radius: 8px; }
.cm-req, .cm-match { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--ph-line); }
.cm-req:first-of-type, .cm-matches li:first-child { border-top: 0; }
.cm-req-t, .cm-match-t { flex: 1; min-width: 0; }
.cm-req-t strong, .cm-match-t strong { display: block; color: var(--ink); }
.cm-req-t p, .cm-match-t p { margin: 6px 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.cm-req-t a { color: var(--ph-link, #F08CFF); }
.cm-req-act, .cm-match-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.cm-req-act form { margin: 0; }
.cm-matches { list-style: none; margin: 0; padding: 0; }
.cm-match-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cm-send { position: relative; }
.cm-send summary { list-style: none; cursor: pointer; }
.cm-send summary::-webkit-details-marker { display: none; }
.cm-send form { display: grid; gap: 8px; margin-top: 8px; width: min(300px, 78vw); }
.cm-link-btn { background: none; border: 0; padding: 6px; color: var(--ph-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; min-height: 36px; }
.cm-chat-log { list-style: none; margin: 0; padding: 4px 0; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.cm-chat-log li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; padding: 8px 0; border-bottom: 1px solid var(--ph-line); font-size: .92rem; }
.cm-chat-log strong { color: var(--ink); font-size: .85rem; }
.cm-chat-time { grid-row: span 2; color: var(--ph-muted); font-size: .75rem; font-variant-numeric: tabular-nums; padding-top: 2px; min-width: 44px; }
.cm-chat-body { overflow-wrap: anywhere; line-height: 1.5; }
.cm-chat-empty { display: block !important; color: var(--ph-muted); text-align: center; padding: 18px 0 !important; }
.cm-chat-form { display: flex; gap: 8px; margin-top: 12px; }
.cm-chat-form .input { flex: 1; min-width: 0; }
.cm-chat-form .tbtn { min-width: 44px; min-height: 44px; justify-content: center; }
.cm-chat-note { margin: 8px 0 0; }

@media (min-width: 640px) {
  .cm-search { grid-template-columns: minmax(0, 1fr) minmax(0, 220px) auto; }
  .cm-filter { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
  .cm-wb-past { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-wb-lead { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .cm-wb-when { border-bottom: 0; border-right: 1px solid var(--ph-line); padding: 26px; }
  .cm-wb-lead-t { padding: 26px; }
  .cm-geo-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}
@media (min-width: 900px) {
  .cm-hub { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 40px; }
  .cm-forum { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 36px; }
  .cm-alumni { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
  .cm-alumni-empty { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; }
  .cm-alumni-add { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
  .cm-wb-past { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .cm-buddy { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
  .cm-buddy-form { position: sticky; top: 84px; }
}
@media (max-width: 520px) {
  .cm-q { gap: 12px; }
  .cm-q-stats { width: 52px; }
  .cm-vote { width: 44px; }
  .cm-post { gap: 10px; }
  .cm-hub-actions { margin-left: 0; }
  .cm-recent { margin-left: 0; padding-left: 12px; }
  .cm-match, .cm-req { flex-wrap: wrap; }
  .cm-match-act, .cm-req-act { width: 100%; justify-content: flex-start; padding-left: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-go, .cm-vote-btn { transition: none; }
}
