.pmd-community { --community-a: #bb4c23; --community-a-bg: #fff3ed; --community-b: #245ed6; --community-b-bg: #edf3ff; }
:root[data-pmd-theme="dark"] .pmd-community { --community-a: #ffac85; --community-a-bg: #35251f; --community-b: #98baff; --community-b-bg: #1c3049; }
.community-page { max-width: 69rem; padding-top: 3rem; }
.community-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1.25rem; margin-bottom:1.8rem; }
.community-heading > * { min-width:0; }
.community-eyebrow { font-size:.6875rem; letter-spacing:.18em; font-weight:650; color:var(--blue); margin:0 0 .75rem; }
.community-heading h1 { margin:0; font-size:clamp(1.75rem,3vw,2.3rem); letter-spacing:-.05em; font-weight:650; }
.community-heading p:not(.community-eyebrow) { margin:.6rem 0 0; color:var(--muted); font-size:.9375rem; }
.community-kinds { display:flex; gap:1.5rem; border-bottom:1px solid var(--line); margin-bottom:1.2rem; }
.community-kinds a { display:flex; align-items:center; min-height:48px; color:var(--muted); font-size:.9375rem; text-decoration:none; border-bottom:2px solid transparent; padding:.65rem .15rem; }
.community-kinds a[aria-current="page"] { color:var(--text); border-bottom-color:var(--blue); font-weight:650; }
.pmd-community button,.pmd-community input,.pmd-community select,.pmd-community textarea { border:1px solid var(--line); border-radius:.75rem; padding:.65rem .9rem; color:var(--text); background:var(--panel); }
.pmd-community textarea { font:inherit; resize:vertical; width:100%; min-height:7rem; }
.pmd-community textarea:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.pmd-community .pmd-theme-toggle { border:0; padding:0; background:transparent; }
.pmd-community .community-primary { max-width:100%; background:var(--blue); border-color:var(--blue); color:var(--bg); font-weight:600; white-space:normal; }
.pmd-community .community-primary:hover { filter:brightness(.94); }
.community-notice { background:var(--panel2); border:1px solid var(--line); border-radius:.8rem; padding:.8rem 1rem; color:var(--muted); font-size:.8125rem; line-height:1.65; }
.community-notice a { margin-left:.5rem; font-weight:600; }
.community-error { padding:.75rem 1rem; color:var(--danger); background:var(--warning-soft); border-radius:.6rem; font-size:.875rem; overflow-wrap:anywhere; }
.community-tools { display:flex; justify-content:flex-end; gap:.25rem; padding:.3rem 0 1rem; flex-wrap:wrap; }
.community-tools button { background:transparent; border:0; color:var(--muted); font-size:.8125rem; padding:.5rem .6rem; }
.community-filters { display:flex; gap:.65rem; }
.community-filters label { min-width:0; }
.community-filters input { width:100%; background:var(--panel3); }
.community-search { flex:1; }
.community-filters label:not(.community-search) { flex:0 1 10rem; }
.community-feeds { display:flex; gap:.35rem; margin-bottom:1rem; flex-wrap:wrap; }
.community-feeds button { min-height:44px; padding:.6rem .9rem; border-color:transparent; background:transparent; font-size:.875rem; color:var(--muted); }
.community-feeds button[aria-pressed="true"] { color:var(--blue); background:var(--accent-soft); font-weight:600; }
.community-ranking-info { color:var(--muted); background:var(--panel2); border-radius:.7rem; padding:.75rem .9rem; margin:0 0 1rem; font-size:.75rem; line-height:1.75; }
.community-best-summary { border:1px solid var(--line); border-radius:.8rem; padding:1rem; margin-bottom:1.25rem; }
.community-best-summary-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.5rem; }
.community-best-summary-head h2 { font-size:.9375rem; font-weight:650; margin:0 0 .2rem; }
.community-best-summary-head p { color:var(--muted); font-size:.6875rem; margin:0; }
.community-best-summary-head a { display:inline-flex; align-items:center; min-height:44px; color:var(--blue); font-size:.75rem; padding:.4rem .1rem; white-space:nowrap; text-decoration:none; }
.community-best-summary-list { list-style:none; padding:0; margin:0; }
.community-best-summary-list a { display:flex; align-items:center; gap:.7rem; min-height:38px; color:var(--text); text-decoration:none; padding:.3rem 0; }
.community-best-summary-list a:hover .community-best-title { color:var(--blue); }
.community-best-rank { width:1rem; flex-shrink:0; color:var(--blue); font-size:.75rem; font-weight:650; }
.community-best-title { flex:1; min-width:0; font-size:.8125rem; overflow-wrap:anywhere; }
.community-best-title .community-tag { margin-left:.4rem; font-size:.625rem; min-height:1.2rem; }
.community-best-score { color:var(--muted); font-size:.6875rem; white-space:nowrap; }
.community-best-empty,.community-best-summary-info { color:var(--muted); font-size:.6875rem; line-height:1.75; margin:.5rem 0 0; }
.community-categories { display:flex; gap:.35rem; padding:1.2rem 0; flex-wrap:wrap; }
.community-categories button { border-color:transparent; background:transparent; color:var(--muted); font-size:.875rem; }
.community-categories button[aria-pressed="true"] { background:var(--text); color:var(--bg); }
.community-topics { border-top:1px solid var(--line); }
.community-topic { display:block; padding:1.4rem .2rem; border-bottom:1px solid var(--line); text-decoration:none; color:var(--text); }
.community-topic:hover h2 { color:var(--blue); }
.community-topic h2 { font-size:1.05rem; margin:.55rem 0; font-weight:600; letter-spacing:-.015em; }
.community-topic p { color:var(--muted); font-size:.875rem; margin:.4rem 0 .9rem; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.community-meta,.community-tags { display:flex; align-items:center; gap:.5rem .75rem; flex-wrap:wrap; color:var(--muted); font-size:.75rem; }
.community-meta .community-counts { margin-left:auto; }
.community-tag { display:inline-flex; align-items:center; min-height:1.65rem; padding:.1rem .5rem; border-radius:.4rem; background:var(--panel2); color:var(--muted); font-size:.75rem; }
.community-tag.symbol { background:var(--accent-soft); color:var(--blue); font-weight:600; }
.community-tag-notice { color:var(--blue); background:var(--accent-soft); font-weight:600; }
.community-topic.community-board-row { display:grid; grid-template-columns:minmax(0,1fr) 22rem; gap:1.25rem; align-items:center; min-height:62px; padding:.75rem .25rem; }
.community-board-row .community-row-title { min-width:0; }
.community-board-row .community-tags { display:inline-flex; gap:.3rem; margin-right:.45rem; vertical-align:middle; }
.community-board-row .community-tag { min-height:1.35rem; padding:.05rem .35rem; font-size:.6875rem; }
.community-board-row h2 { display:inline; font-size:.9375rem; line-height:1.7; margin:0; font-weight:500; overflow-wrap:anywhere; }
.community-notice-row h2 { font-weight:600; }
.community-row-comments { color:var(--blue); margin-left:.4rem; font-size:.75rem; white-space:nowrap; }
.community-row-meta { display:grid; grid-template-columns:minmax(0,1fr) 4rem 4rem 4rem; gap:.65rem; font-size:.75rem; color:var(--muted); white-space:nowrap; }
.community-row-author { overflow:hidden; text-overflow:ellipsis; }
.community-row-recommendations { text-align:right; }
.community-empty { text-align:center; padding:4rem 1rem; color:var(--muted); font-size:.9375rem; }
.community-empty strong { display:block; margin:0 0 .6rem; color:var(--text); font-size:1.1rem; font-weight:600; }
.community-empty p { margin:.4rem 0 1.2rem; }
.community-empty a,.community-back,.community-action-link { display:inline-flex; min-height:44px; align-items:center; gap:.35rem; }
.community-more { display:block; width:100%; margin-top:1rem; background:var(--panel3)!important; }
.community-detail { max-width:49rem; margin:0 auto; }
.community-back { color:var(--muted); text-decoration:none; font-size:.875rem; margin-bottom:1.25rem; }
.community-detail h1.community-title { font-size:clamp(1.45rem,2.7vw,1.9rem); line-height:1.45; letter-spacing:-.045em; font-weight:650; margin:.75rem 0 .9rem; }
.community-body { font-size:1rem; line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere; margin:2rem 0 1rem; }
.community-detail-actions { display:flex; justify-content:flex-end; gap:.25rem; flex-wrap:wrap; margin:0 0 1.5rem; }
.community-detail-actions button,.community-comment-actions button { border:0; background:transparent; color:var(--muted); font-size:.75rem; padding:.45rem .55rem; }
.community-poll { border:1px solid var(--line); border-radius:1.3rem; padding:1.6rem; background:var(--panel); box-shadow:0 3px 12px #20293804; }
.community-poll-heading { display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between; align-items:center; margin-bottom:1.25rem; }
.community-poll-heading h3 { margin:.2rem 0; font-size:1.05rem; font-weight:650; }
.community-poll-heading small { color:var(--muted); font-size:.75rem; }
.community-poll-total { font-size:.8125rem; color:var(--muted); white-space:nowrap; }
.community-poll-options { display:grid; grid-template-columns:1fr 1fr; gap:.8rem; }
.community-poll-options button { text-align:left; display:flex; flex-direction:column; gap:.5rem; padding:1.15rem; border:2px solid transparent; min-width:0; }
.community-poll-options .side-a { color:var(--community-a); background:var(--community-a-bg); }
.community-poll-options .side-b { color:var(--community-b); background:var(--community-b-bg); }
.community-poll-options button[aria-pressed="true"] { border-color:currentColor; }
.community-poll-options small { font-weight:700; font-size:.75rem; }
.community-poll-options .option-label { color:var(--text); font-size:.9375rem; font-weight:600; min-height:3em; }
.community-poll-options strong { font-size:1.75rem; letter-spacing:-.04em; line-height:1.2; }
.community-poll-options .choice-hold { grid-column:1/-1; flex-direction:row; justify-content:space-between; align-items:center; background:var(--panel2); color:var(--muted); padding:.7rem 1rem; }
.community-poll-options .choice-hold strong { font-size:.9375rem; }
.community-poll-bar { display:flex; height:.45rem; background:var(--panel2); overflow:hidden; border-radius:1rem; margin-top:1.2rem; }
.community-poll-bar span:nth-child(1) { background:var(--community-a); }
.community-poll-bar span:nth-child(2) { background:var(--community-b); }
.community-poll-bar span:nth-child(3) { background:var(--muted); }
.community-poll-note { color:var(--muted); font-size:.75rem; line-height:1.7; margin:.85rem 0 0; }
.community-recommendation { text-align:center; padding:1.25rem 0 .4rem; }
.community-recommendation button { min-height:48px; min-width:8rem; padding:.75rem 1.25rem; font-size:.9375rem; color:var(--blue); }
.community-recommendation button[aria-pressed="true"] { background:var(--accent-soft); border-color:var(--blue); }
.community-recommendation button:disabled { opacity:.55; cursor:default; }
.community-recommendation strong { margin-left:.45rem; }
.community-recommendation p { font-size:.75rem; color:var(--muted); line-height:1.75; margin:.65rem 0 0; }
.community-comments { margin-top:2.2rem; }
.community-comments h3 { font-size:1rem; margin:0 0 1rem; }
.community-comment-composer { background:var(--panel3); border-radius:.85rem; padding:1rem; margin-bottom:1.25rem; }
.community-comment-composer textarea { background:var(--panel); font-size:.9375rem; }
.community-comment-composer .community-composer-bottom { display:flex; justify-content:space-between; gap:.75rem; align-items:center; margin-top:.5rem; }
.community-comment-composer small { color:var(--muted); font-size:.75rem; }
.community-comments-list,.community-thread-replies { display:grid; gap:.625rem; list-style:none; padding:0; margin:0; }
.community-comment-thread { min-width:0; padding:.8rem; border:1px solid var(--line); border-radius:.8rem; background:var(--panel); }
.community-thread-replies { margin:.625rem 0 0 .5rem; }
.community-comment.reply { min-width:0; padding:.55rem .65rem; border:1px solid var(--line); border-radius:.625rem; background:var(--panel3); }
.community-comment:focus { outline:2px solid var(--blue); outline-offset:3px; }
.community-reply-to { margin:0 0 .3rem; color:var(--muted); font-size:.75rem; overflow-wrap:anywhere; }
.community-comment-header { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; font-size:.8125rem; }
.community-comment-header time { font-size:.75rem; color:var(--muted); margin-left:auto; }
.community-comment-body { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; font-size:.9375rem; margin:.65rem 0 .2rem; }
.community-comment-actions { display:flex; gap:.15rem; flex-wrap:wrap; }
.community-comment-actions:empty { display:none; }
.community-comment-actions button[data-action="reply"] { color:var(--blue); }
.community-stance { padding:.12rem .45rem; font-size:.6875rem; border-radius:.4rem; color:var(--muted); background:var(--panel2); }
.community-stance.side-a { background:var(--community-a-bg); color:var(--community-a); }
.community-stance.side-b { background:var(--community-b-bg); color:var(--community-b); }
.community-reply-target { display:flex; align-items:center; justify-content:space-between; gap:.5rem; font-size:.8125rem; color:var(--blue); margin-bottom:.5rem; }
.community-guidelines { margin-top:2.5rem; padding:1.1rem 0; border-top:1px solid var(--line); color:var(--muted); font-size:.8125rem; }
.community-guidelines summary { min-height:44px; cursor:pointer; padding:.55rem 0; }
.community-guidelines p { max-width:52rem; line-height:1.8; }
.community-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#communityDialog { width:min(40rem,calc(100% - 2rem)); max-height:calc(100dvh - 2rem); overflow:auto; background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:1.2rem; padding:1.5rem; box-shadow:var(--shadow); }
#communityDialog::backdrop { background:#10182088; }
.community-dialog-head { display:flex; gap:1rem; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.community-dialog-head h2 { margin:0; font-size:1.2rem; font-weight:650; }
.community-dialog-head .community-icon-button { border:0; font-size:1.5rem; min-width:44px; padding:0; }
.community-form { display:grid; gap:1rem; }
.community-form label { display:grid; gap:.35rem; font-size:.875rem; }
.community-form input,.community-form select { width:100%; }
.community-form small,.community-dialog-note { color:var(--muted); font-size:.8125rem; line-height:1.7; }
.community-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
.community-form .community-actions { display:flex; gap:.5rem; justify-content:flex-end; }
.community-form .community-actions button { min-width:5rem; }
.community-management-row { padding:1rem 0; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; gap:.75rem; flex-wrap:wrap; font-size:.875rem; }
.community-report-item { border-bottom:1px solid var(--line); padding:1rem 0; }
.community-report-item p { font-size:.875rem; white-space:pre-wrap; }
.community-report-item .community-meta { margin-bottom:.5rem; }
.community-report-item button { font-size:.75rem; margin-right:.3rem; }
.community-report-evidence { background:var(--panel3); padding:.7rem; border-radius:.7rem; margin:.5rem 0; }
.community-report-evidence summary { min-height:44px; cursor:pointer; padding:.5rem 0; font-size:.8125rem; }
@media(max-width:47.999rem) {
  .pmd-community .pmd-primary-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .pmd-community .pmd-primary-nav a { font-size:.8125rem; padding-inline:.15rem; }
  .community-page { padding:1.8rem 1rem calc(5rem + env(safe-area-inset-bottom)); }
  .community-heading { align-items:flex-start; gap:.5rem; }
  .community-heading h1 { font-size:1.6rem; }
  .community-heading p:not(.community-eyebrow) { font-size:.8125rem; max-width:15rem; }
  .community-heading .community-primary { font-size:.8125rem; padding:.6rem .65rem; margin-top:1.3rem; }
  .community-kinds { gap:1.2rem; margin-bottom:1rem; }
  .community-kinds a { font-size:.875rem; }
  .community-feeds { gap:.15rem; }
  .community-feeds button { padding:.6rem .7rem; font-size:.8125rem; }
  .community-best-summary { padding:.85rem; }
  .community-best-summary-head { gap:.5rem; }
  .community-best-summary-list a { min-height:44px; gap:.5rem; }
  .community-filters { flex-wrap:wrap; gap:.5rem; }
  .community-filters .community-search { flex-basis:100%; }
  .community-filters label:not(.community-search) { flex:1; }
  .community-categories { gap:.1rem; }
  .community-categories button { padding:.5rem .8rem; font-size:.8125rem; }
  .community-topic { padding:1.2rem 0; }
  .community-topic.community-board-row { grid-template-columns:minmax(0,1fr); gap:.35rem; padding:.7rem 0; min-height:0; }
  .community-board-row h2 { font-size:.875rem; }
  .community-row-meta { display:flex; flex-wrap:wrap; gap:.75rem; font-size:.6875rem; white-space:normal; }
  .community-row-author { max-width:7rem; }
  .community-row-recommendations { margin-left:auto; }
  .community-meta { gap:.35rem .65rem; }
  .community-meta .community-counts { width:100%; margin-left:0; }
  .community-detail h1.community-title { font-size:1.45rem; }
  .community-body { margin-top:1.4rem; font-size:.9375rem; }
  .community-poll { padding:1.1rem; border-radius:1rem; }
  .community-poll-options { gap:.5rem; }
  .community-poll-options button { padding:.85rem .7rem; }
  .community-poll-options .option-label { font-size:.875rem; min-height:4.5em; }
  .community-poll-options strong { font-size:1.5rem; }
  .community-poll-heading { align-items:flex-start; gap:.5rem; }
  .community-poll-total { font-size:.75rem; }
  .community-comment-thread { padding:.625rem; }
  .community-comment-header time { width:100%; margin-left:0; }
  .community-form-grid { grid-template-columns:1fr; }
  #communityDialog { padding:1.15rem; }
}
