/* 社区广场：对齐参考稿信息流 */
.cm-page { max-width: 760px; margin: 0 auto; }
.cm-wrap { width: 100%; }
.cm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cm-pills {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  gap: 2px;
}
.cm-pill {
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.cm-pill.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 18, 28, .06);
}
.cm-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #6366f1, #d946ef);
  box-shadow: 0 6px 16px -8px rgba(168, 85, 247, .55);
}
.cm-post-btn svg { width: 15px; height: 15px; }
.cm-post-btn:disabled { opacity: .6; cursor: not-allowed; }
.cm-post-btn--sm { height: 38px; border-radius: 10px; padding: 0 18px; }

.cm-feed { display: flex; flex-direction: column; gap: 12px; }
.cm-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px 12px;
}
.cm-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 28px;
}
.cm-card__head img,
.cm-cmt img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  flex: none;
}
.cm-card__head img { cursor: pointer; }
.cm-card__meta { min-width: 0; flex: 1; }
.cm-card__name {
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}
.cm-card__name:hover { color: var(--primary-strong); }
.cm-card__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cm-card__sub svg { width: 13px; height: 13px; }
.cm-morebtn {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.cm-morebtn:hover { background: var(--surface-2); color: var(--text); }
.cm-menu {
  position: absolute;
  top: 42px;
  right: 10px;
  min-width: 108px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 5;
}
.cm-menu.hidden { display: none; }
.cm-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}
.cm-menu button:hover { background: var(--surface-2); }
.cm-menu button.is-danger { color: #b91c1c; }
.cm-card__body {
  margin: 12px 0 8px;
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: pointer;
}
.cm-card__photo {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 0 10px;
}
.cm-card__ops {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}
.cm-ico {
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cm-ico svg { width: 18px; height: 18px; }
.cm-ico:hover { background: var(--surface-2); color: var(--text); }
.cm-ico.is-on { color: #e11d48; }

.cm-empty {
  text-align: center;
  color: var(--text-3);
  font-size: 13.5px;
  padding: 48px 12px;
}
.cm-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 8px;
}
.cm-pager.hidden { display: none; }
.cm-pager button {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 650;
  cursor: pointer;
}
.cm-pager button:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.cm-pager button:disabled { opacity: .4; cursor: not-allowed; }
.cm-pager span { font-size: 13.5px; color: var(--text-2); font-weight: 650; }

.cm-compose-panel { max-width: 560px; padding: 20px 22px 18px; }
.cm-compose-panel .shell-modal__title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.cm-compose-panel textarea,
.cm-reply textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.cm-compose-panel textarea:focus,
.cm-reply textarea:focus { border-color: #c4b5fd; }
.cm-img-preview { margin-top: 10px; }
.cm-img-preview img {
  max-width: 160px;
  max-height: 120px;
  border-radius: 10px;
  object-fit: cover;
}
.cm-img-preview.hidden { display: none; }
.cm-compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.cm-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 12.5px;
  cursor: pointer;
}
.cm-upload svg { width: 18px; height: 18px; flex: none; }
.cm-vis { position: relative; }
.cm-vis__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
}
.cm-vis__btn svg { width: 16px; height: 16px; }
.cm-vis__menu {
  position: absolute;
  right: 0;
  top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  min-width: 88px;
  padding: 6px;
  z-index: 6;
}
.cm-vis__menu.hidden { display: none; }
.cm-vis__menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
}
.cm-vis__menu button:hover { background: var(--surface-2); }
.cm-compose-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.cm-count { margin-right: auto; font-size: 12px; color: var(--text-3); }
.cm-btn-ghost {
  height: 38px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  border-radius: 10px;
}
.cm-btn-ghost:hover { background: var(--surface-2); }

.cm-detail-panel { max-width: 560px; max-height: min(860px, calc(100vh - 40px)); overflow: auto; }
.cm-detail-split { height: 1px; background: var(--border); margin: 8px 0 12px; }
.cm-comments { display: flex; flex-direction: column; gap: 12px; min-height: 8px; }
.cm-cmt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.cm-cmt__name { font-size: 13.5px; font-weight: 700; }
.cm-cmt__txt { font-size: 14px; line-height: 1.5; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.cm-cmt__time { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.cm-cmt__del {
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.cm-cmt__del:hover { color: #b91c1c; }
.cm-reply {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.cm-reply textarea { flex: 1; min-height: 44px; }

html[data-theme="dark"] .cm-pills { background: #2a2d36; }
html[data-theme="dark"] .cm-pill.is-active { background: var(--surface); }
html[data-theme="dark"] .cm-vis__menu,
html[data-theme="dark"] .cm-menu { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .cm-compose-panel textarea,
html[data-theme="dark"] .cm-reply textarea { background: var(--surface-2); }

@media (max-width: 640px) {
  .cm-upload span { display: none; }
  .cm-toolbar { flex-wrap: wrap; }
}
