.community-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;margin:0 0 1rem;border:1px solid var(--border,#494052);border-radius:12px;background:var(--surface,#191b28)}
#guess-view > #community-hub { margin-top:24px; }
.community-toolbar strong,.community-toolbar #community-status{display:block}.community-toolbar #community-status{margin-top:.2rem}
.community-actions,.community-filters,.community-periods{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.community-toolbar button,.community-toolbar select{font-size:.82rem;padding:.55rem .75rem;min-height:38px}
#community-dialog{width:min(820px,calc(100vw - 2rem));max-height:85vh;padding:1.25rem;border:1px solid #554466;border-radius:16px;background:#191d29;color:#f4f1ff;box-sizing:border-box;overflow:auto}
#community-dialog::backdrop{background:#090a12c9;backdrop-filter:blur(5px)}
.community-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.community-heading h2{margin:0 0 1rem}
.community-filters select,.community-toolbar select{background:#15151f;color:inherit;border:1px solid #494052;border-radius:8px;padding:.55rem}
.community-periods button{border:1px solid #494052;border-radius:8px;background:#252331;color:inherit;padding:.6rem .8rem}
.community-periods [aria-pressed=true]{background:#c29dff;color:#151122;font-weight:700}
#community-dialog button,.community-toolbar button{user-select:none;-webkit-user-select:none}
#leaderboard-status{min-height:1.3em;margin:.75rem 0}
.community-table-scroll{overflow-x:auto}.community-table{border-collapse:collapse;width:100%;font-size:.9rem;text-align:left}
.community-table th,.community-table td{padding:.55rem .5rem;border-bottom:1px solid #363441;white-space:nowrap}
.community-table td:nth-child(n+3),.community-table th:nth-child(n+3){text-align:right}
.community-table thead{color:#bdb6ce;font-size:.78rem}.community-player{display:inline-block;vertical-align:middle}
.community-player small{color:#c29dff;font-size:.6rem}.community-you{background:#b48aff12}
.community-rank{color:#c5b7dc}.community-rank.community-podium{color:#ffd166;font-weight:700}
.community-badges{display:inline-flex;align-items:center;vertical-align:middle;gap:.3rem;margin-left:.4rem}
.community-flair{font-size:.6rem;letter-spacing:.04em;padding:.15rem .3rem;border-radius:4px;font-weight:800}
.community-flair-dev{background:#684293;color:#eee1ff}.community-flair-friend{background:#23594d;color:#b4f1db}
.community-achievement svg{display:block;width:28px;height:28px;color:#d9b3ff}
.badge-frame{fill:#b083ef18;stroke:#9b78c6;stroke-width:1}
.community-pagination{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-top:.75rem}
.community-pagination[hidden]{display:none}
.community-empty{display:grid;justify-items:center;padding:1rem}.community-empty svg{width:48px;height:48px;color:#d9b3ff}
.community-showcase,.community-help{border-top:1px solid #363441;margin-top:1rem;padding-top:.75rem}
.community-showcase summary,.community-help summary{cursor:pointer}.community-badge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}
.community-badge-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;padding:.6rem;background:#222330;color:#e9e2f5;border:1px solid #464050;border-radius:10px;min-height:100px;font:inherit}
.community-badge-grid svg{width:42px;height:42px;color:#d9b3ff}.community-badge-grid strong{font-size:.8rem}.community-badge-grid small{font-size:.72rem}
.community-badge-grid button:disabled{opacity:.5}.community-badge-grid [aria-pressed=true]{border-color:#c29dff;background:#a378dd25}
#community-dialog button:focus-visible,.community-toolbar button:focus-visible{outline:2px solid #d0b3ff;outline-offset:3px}
@media(max-width:650px){.community-toolbar{flex-direction:column;align-items:flex-start}.community-filters{gap:.4rem}.community-filters [data-hub="refresh-board"]{font-size:.75rem;padding:.5rem}.community-table{font-size:.8rem}.community-table th,.community-table td{padding:.45rem .3rem}.community-badge-grid{grid-template-columns:repeat(2,1fr)}}

.community-flair-vip{background:#665020;color:#ffe6a0}

.community-flair-wife{background:#762a54;color:#ffe0ee}

.community-flair-ham{background:#f6a9cb;color:#57142f}

/* Community filters are controls, not dark informational chips. */
.community-periods button, .community-toolbar button:not(.button) {
  border: 1px solid #a991d7;
  background: #403450;
  color: #faf6ff;
  border-radius: 8px;
}
.community-periods button:not([aria-pressed="true"]):hover,
.community-toolbar button:not(.button):hover { background: #574372; border-color: #e3d0ff; }
.community-periods button:active, .community-toolbar button:not(.button):active { background: #32283e; }
.community-periods [aria-pressed="true"] { background: #c29dff; border-color: #e5cdff; color: #151122; }
.community-periods button:disabled, .community-toolbar button:disabled { opacity: .52; }
.community-badge-grid button { border-color: #8570a6; background: #342d45; }
.community-badge-grid button:hover:not(:disabled) { border-color: #d6b9ff; background: #473858; }
.community-badge-grid button:active:not(:disabled) { background: #2b2538; }
.community-badge-grid [aria-pressed="true"] { background: #634385; border-color: #e7ceff; }
