/* MPM community board — built on the landing site's tokens (style.css). */
.brand-sub { font-weight: 700; font-size: 14px; color: var(--muted); margin-left: 4px; }
.linkish { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: #fff; }

.cm { padding: 22px 0 64px; min-height: 70vh; }
.cm .wrap { max-width: 980px; }

/* Board tabs */
.cm-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 2px solid var(--row-line); margin: 0 0 16px; }
.cm-tabs::-webkit-scrollbar { display: none; }
.cm-tab { flex: none; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.cm-tab:hover { color: #fff; }
.cm-tab.on { color: #fff; border-bottom-color: var(--red); }

/* Buttons and inputs */
.cm-btn {
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; font-size: 14px; line-height: 1;
  color: #fff; text-decoration: none; padding: 9px 14px; min-height: 38px; border: 2px solid var(--ink); border-radius: 5px; cursor: pointer;
  background: #4b3d5f; box-shadow: inset 0 2px 0 #74608c, inset 0 -3px 0 #2c2238;
}
.cm-btn:hover { color: #fff; filter: brightness(1.12); }
.cm-btn:disabled { opacity: .55; cursor: default; }
.cm-btn-pri { background: var(--red-2); box-shadow: inset 0 2px 0 var(--red-hi), inset 0 -3px 0 var(--red-lo); }
.cm input[type="text"], .cm input[type="search"], .cm input[type="password"], .cm textarea, .cm select {
  font: inherit; font-size: 15px; color: var(--text); background: var(--bg-2); border: 2px solid var(--line); border-radius: 5px; padding: 8px 10px; min-height: 40px; min-width: 0;
}
.cm textarea { width: 100%; resize: vertical; line-height: 1.6; }
.cm input:focus, .cm textarea:focus, .cm select:focus { border-color: var(--accent); outline: none; }
.cm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.cm-msg { padding: 28px 0; color: var(--muted); text-align: center; }
.cm-msg.error { color: var(--red-hi); }
.cm-inline-msg { color: var(--red-hi); font-size: 14px; margin: 0; }
.cm-hint { color: var(--dim); font-size: 13px; }

/* List */
.cm-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.cm-search { display: flex; gap: 6px; flex: 1; max-width: 420px; }
.cm-search input { flex: 1; }
.cm-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line); }
.cm-row { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--row-line); }
.cm-row:hover { background: #ffffff08; }
.cm-row.pinned { background: #ff9a720d; }
.cm-row.pinned .cm-title { font-weight: 800; }
.cm-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.cm-row-main:visited .cm-title { color: var(--muted); }
.cm-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cm-ccount { color: var(--accent); font-size: 13px; font-weight: 700; flex: none; }
.cm-row-meta { display: flex; align-items: center; gap: 12px; flex: none; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.cm-row-meta .cm-author { width: 132px; overflow: hidden; }
.cm-row-meta .cm-date { width: 44px; text-align: right; }
.cm-num { width: 44px; text-align: right; }
.cm-k { display: none; }
.cm-chip { flex: none; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 3px; background: var(--panel-2); color: var(--muted); }
.cm-chip.b-notice { background: var(--red-2); color: #fff; }
.cm-chip.b-tips { background: #2f5a3a; color: #d8f5d0; }
.cm-chip.b-bugs { background: #5a3a2a; color: #ffd8c0; }
.cm-chip.b-ideas { background: #2f3f66; color: #d4e0ff; }
.cm-author { display: inline-flex; align-items: baseline; gap: 3px; min-width: 0; white-space: nowrap; }
.cm-nick { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.cm-tag { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.cm-badge { font-size: 11px; font-weight: 800; color: var(--ink); background: var(--gold); padding: 1px 5px; border-radius: 3px; }

.cm-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 20px 0 0; }
.cm-page { min-width: 36px; padding: 6px 10px; text-align: center; color: var(--muted); text-decoration: none; border-radius: 4px; font-variant-numeric: tabular-nums; }
.cm-page:hover { background: #ffffff10; color: #fff; }
.cm-page.on { background: var(--red-2); color: #fff; font-weight: 700; }

/* Post */
.cm-post { border-top: 2px solid var(--line); }
.cm-post-head { padding: 18px 4px 14px; border-bottom: 1px solid var(--row-line); }
.cm-post-title { font-size: 22px; margin: 10px 0 10px; overflow-wrap: anywhere; }
.cm-post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--dim); align-items: baseline; }
.cm-post-body { padding: 22px 4px 28px; white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; min-height: 120px; }
.cm-post-body a, .cm-comment-body a { color: var(--accent); word-break: break-all; }
.cm-post-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--row-line); border-bottom: 2px solid var(--line); }
.cm-like-wrap { display: flex; align-items: center; gap: 10px; }
.cm-like { font: inherit; font-weight: 700; color: #fff; background: var(--panel); border: 2px solid var(--gold); border-radius: 999px; padding: 7px 18px; cursor: pointer; }
.cm-like:hover { background: var(--panel-2); }
.cm-like b { color: var(--gold); }
.cm-owner, .cm-del, .cm-del-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cm-del-form input { width: 150px; }
.cm-ban { font-size: 12.5px; color: var(--red-hi); }

/* Comments */
.cm-comment-box { margin-top: 26px; }
.cm-h2 { font-size: 17px; margin: 0 0 10px; }
.cm-h1 { font-size: 22px; margin: 4px 0 16px; }
.cm-comments, .cm-replies { list-style: none; margin: 0; padding: 0; }
.cm-comments { border-top: 2px solid var(--line); margin-bottom: 16px; }
.cm-comment { padding: 11px 4px; border-bottom: 1px solid var(--row-line); }
.cm-replies { margin: 10px 0 -11px; border-top: 1px solid var(--row-line); }
.cm-comment.reply { padding-left: 26px; background: #ffffff05; position: relative; }
.cm-comment.reply::before { content: "└"; position: absolute; left: 9px; top: 10px; color: var(--dim); }
.cm-replies .cm-comment:last-child { border-bottom: 0; }
.cm-comment.deleted .cm-comment-body { color: var(--dim); font-style: italic; }
.cm-comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13.5px; }
.cm-comment-head .cm-date { color: var(--dim); font-size: 12.5px; }
.cm-comment-tools { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-left: auto; font-size: 13px; }
.cm-comment-tools .cm-btn { min-height: 28px; padding: 5px 9px; font-size: 12.5px; }
.cm-comment-body { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }

.cm-cform { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 2px solid var(--ink); border-radius: 6px; padding: 12px; }
.cm-cform.reply { margin: 10px 0 0; }
.cm-cred { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cm-cred input { width: 170px; }
.cm-form-end { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.cm-form-end .cm-inline-msg { margin-right: auto; }

/* Write */
.cm-write { display: flex; flex-direction: column; gap: 10px; }
.cm-write-row { display: flex; gap: 8px; }
.cm-write-row input { flex: 1; }

.cm-privacy { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; max-width: 760px; }
html.cm-admin .topbar { border-bottom-color: var(--gold); }

@media (max-width: 720px) {
  .brand-sub { display: none; }
  .nav a { padding: 6px 8px; font-size: 14px; }
  .cm-bar { flex-wrap: wrap; }
  .cm-search { max-width: none; flex-basis: 100%; order: 2; }
  .cm-bar > .cm-btn-pri { margin-left: auto; }
  .cm-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .cm-title { white-space: normal; }
  .cm-row-meta { gap: 10px; }
  .cm-row-meta .cm-author { width: auto; max-width: 50%; }
  .cm-row-meta .cm-date, .cm-num { width: auto; text-align: left; }
  .cm-k { display: inline; }
  .cm-write-row { flex-direction: column; }
  .cm-cred input { flex: 1; width: auto; }
  .cm-comment-tools { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
}
