/* ═══════════════════════════════════════════════════════════════
   SEOGEO360 Community — Styles
   Extends the sgeo- design system from main.css
   ═══════════════════════════════════════════════════════════════ */

/* Layout */
.comm-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.comm-page  { background: var(--bg); min-height: 100vh; padding-top: 60px; }
.comm-3col  { display: grid; grid-template-columns: 210px 1fr 260px; gap: 22px; align-items: start; padding: 24px 0 80px; }
.comm-2col  { display: grid; grid-template-columns: 1fr 260px; gap: 22px; align-items: start; padding: 24px 0 80px; }
.comm-1col  { max-width: 760px; margin: 0 auto; padding: 24px 0 80px; }

/* Sidebar */
.comm-sidebar { position: sticky; top: 72px; align-self: start; }
.comm-sidebar__section { margin-bottom: 20px; }
.comm-sidebar__heading { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 0 8px; margin-bottom: 6px; }
.comm-sidebar__link { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--txt2); font-size: 13px; margin-bottom: 2px; text-decoration: none; transition: background .15s, color .15s; }
.comm-sidebar__link:hover { background: var(--surf2); color: var(--txt); }
.comm-sidebar__link.active { background: rgba(37,99,235,.1); color: var(--blue2); font-weight: 600; }
.comm-sidebar__link .icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }

/* Tabs */
.comm-tabs { background: var(--bg2); border-bottom: 1px solid var(--bdr); margin-bottom: 14px; position: sticky; top: 68px; z-index: 40; }
.comm-tabs__inner { display: flex; overflow-x: auto; scrollbar-width: none; }
.comm-tabs__inner::-webkit-scrollbar { display: none; }
.comm-tab { padding: 11px 14px; font-size: 13px; font-weight: 600; color: var(--txt2); background: none; border: none; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; flex-shrink: 0; }
.comm-tab.active, .comm-tab:hover { color: var(--blue2); }
.comm-tab.active { border-bottom-color: var(--blue2); }

/* Post card */
.comm-post-card { background: var(--surf); border: 1px solid var(--bdr); border-radius: 12px; padding: 16px 18px; margin-bottom: 10px; transition: border-color .15s; }
.comm-post-card:hover { border-color: var(--bdr2); }
.comm-post-card__inner { display: flex; gap: 14px; }
/* Vote column */
.comm-vote { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 38px; flex-shrink: 0; }
.comm-vote__btn { width: 34px; height: 28px; border-radius: 6px; border: 1px solid var(--bdr); background: var(--bg2); color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.comm-vote__btn:hover { border-color: var(--bdr2); color: var(--txt2); }
.comm-vote__btn.up.active  { border-color: #22c55e; background: rgba(34,197,94,.12); color: #22c55e; }
.comm-vote__btn.dn.active  { border-color: #ef4444; background: rgba(239,68,68,.12); color: #ef4444; }
.comm-vote__score { font-size: 13px; font-weight: 800; font-family: var(--fm); line-height: 1; }
.comm-vote__score.pos { color: #22c55e; }
.comm-vote__score.neg { color: #ef4444; }
.comm-vote__score.zero{ color: var(--muted); }
.comm-vote__label { font-size: 7px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; text-align: center; }
/* Content */
.comm-post-card__content { flex: 1; min-width: 0; }
.comm-post-card__meta    { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.comm-type-badge { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }
.comm-channel-link { font-size: 11px; font-weight: 700; color: var(--blue2) !important; font-family: var(--fm); text-decoration: none !important; }
.comm-channel-link:hover { text-decoration: underline !important; }
.comm-post-card__title { font-family: var(--fh); font-size: 15px; font-weight: 700; color: var(--txt); line-height: 1.3; margin-bottom: 5px; text-decoration: none; display: block; }
.comm-post-card__title:hover { color: var(--blue2); }
.comm-post-card__excerpt { font-size: 12.5px; color: var(--txt2); line-height: 1.6; margin-bottom: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.comm-post-card__footer  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.comm-post-card__author  { display: flex; align-items: center; gap: 5px; }
.comm-post-card__author img, .comm-post-card__author div { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.comm-post-card__stat    { color: var(--muted); text-decoration: none; }
.comm-post-card__stat:hover { color: var(--txt2); }
.comm-bookmark-btn { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 11px; color: var(--muted); padding: 0; transition: color .15s; }
.comm-bookmark-btn.saved { color: var(--amber); }
.comm-del-btn { font-size: 10px; padding: 2px 8px; border-radius: 4px; border: 1px solid rgba(239,68,68,.3); color: #f87171; background: none; cursor: pointer; }

/* Skeleton */
.comm-skeleton { height: 120px; background: var(--surf); border: 1px solid var(--bdr); border-radius: 12px; margin-bottom: 10px; opacity: .5; animation: comm-pulse 1.5s ease-in-out infinite; }
@keyframes comm-pulse { 0%,100%{opacity:.5} 50%{opacity:.25} }

/* Thread / single post */
.comm-post-body { background: var(--surf); border: 1px solid var(--bdr); border-radius: 12px; padding: 26px 30px; margin-bottom: 18px; }
.comm-post-body h1 { font-size: clamp(20px,3vw,28px); font-weight: 800; letter-spacing: -.5px; margin-bottom: 16px; line-height: 1.25; }
.comm-post-body__content { font-size: 15px; color: var(--txt2); line-height: 1.8; }
.comm-post-body__content p { margin-bottom: 14px; }
.comm-post-body__actions { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--bdr); align-items: center; flex-wrap: wrap; }
.comm-action-btn { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--bdr2); background: transparent; color: var(--txt2); cursor: pointer; transition: all .15s; }
.comm-action-btn:hover { background: var(--surf2); color: var(--txt); }
.comm-action-btn.boost.active  { border-color: #22c55e; background: rgba(34,197,94,.08); color: #22c55e; }
.comm-action-btn.flag.active   { border-color: #ef4444; background: rgba(239,68,68,.08); color: #ef4444; }

/* Comments */
.comm-comments-hd { font-family: var(--fh); font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--txt); }
.comm-comment { display: flex; gap: 12px; margin-bottom: 16px; padding: 14px 16px; background: var(--surf); border: 1px solid var(--bdr); border-radius: 10px; }
.comm-comment.best { background: rgba(16,185,129,.04); border-color: rgba(16,185,129,.2); }
.comm-comment__av { flex-shrink: 0; }
.comm-comment__body { flex: 1; }
.comm-comment__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.comm-comment__meta strong { font-size: 13px; color: var(--txt); }
.comm-comment__meta span   { font-size: 11px; color: var(--muted); }
.comm-best-badge { font-size: 9px; font-weight: 700; color: #10b981; background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.2); padding: 2px 7px; border-radius: 4px; }
.comm-comment__text { font-size: 14px; color: var(--txt2); line-height: 1.7; margin: 0; }

/* Comment form */
.comm-comment-form { background: var(--surf); border: 1px solid var(--bdr); border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.comm-comment-form textarea { width: 100%; min-height: 90px; background: var(--bg2); border: 1px solid var(--bdr2); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--txt); font-family: var(--fb); resize: vertical; outline: none; box-sizing: border-box; }
.comm-comment-form textarea:focus { border-color: var(--blue2); }
.comm-comment-form__footer { display: flex; justify-content: flex-end; margin-top: 10px; }

/* Submit form */
.comm-form { background: var(--surf); border: 1px solid var(--bdr); border-radius: 12px; padding: 28px; }
.comm-form__group { margin-bottom: 18px; }
.comm-form__label { font-size: 11px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .07em; display: block; margin-bottom: 7px; }
.comm-form__input, .comm-form__select, .comm-form__textarea {
    width: 100%; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--bdr2);
    border-radius: 8px; font-size: 14px; color: var(--txt); font-family: var(--fb);
    outline: none; box-sizing: border-box; transition: border-color .15s;
}
.comm-form__input:focus, .comm-form__select:focus, .comm-form__textarea:focus { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.comm-form__textarea { min-height: 200px; resize: vertical; line-height: 1.7; }
.comm-form__hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.comm-type-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.comm-type-btn { font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--bdr2); background: transparent; color: var(--txt2); cursor: pointer; transition: all .15s; }
.comm-type-btn.active { border-color: var(--blue2); background: rgba(37,99,235,.08); color: var(--blue2); }
.comm-data-backed-label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--bdr); border-radius: 8px; }
.comm-data-backed-label.checked { border-color: rgba(16,185,129,.3); }

/* Right rail */
.comm-rail { position: sticky; top: 86px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.comm-rail-box { background: var(--surf); border: 1px solid var(--bdr); border-radius: 10px; padding: 14px 16px; }
.comm-rail-box__title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }

/* Hero bar */
.comm-hero { background: linear-gradient(135deg,rgba(37,99,235,.07),rgba(14,165,233,.04),transparent); border-bottom: 1px solid var(--bdr); padding: 32px 0 28px; text-align: center; }
.comm-hero h1 { font-family: var(--fh); font-size: clamp(24px,3.5vw,40px); font-weight: 800; letter-spacing: -1px; color: var(--txt); margin-bottom: 10px; line-height: 1.15; }
.comm-hero p  { font-size: 15px; color: var(--txt2); margin-bottom: 20px; }
.comm-hero__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Channel header */
.comm-channel-hero { background: var(--bg2); border-bottom: 1px solid var(--bdr); padding: 22px 0; }
.comm-channel-hero__inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.comm-channel-hero__icon { width: 50px; height: 50px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.comm-channel-hero__info { flex: 1; }
.comm-channel-hero__slug { font-family: var(--fm); font-size: 12px; color: var(--blue2); margin-bottom: 2px; }
.comm-channel-hero__name { font-family: var(--fh); font-size: 20px; font-weight: 800; color: var(--txt); }
.comm-channel-hero__meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Empty state */
.comm-empty { text-align: center; padding: 60px 20px; }
.comm-empty__icon { font-size: 40px; margin-bottom: 12px; }
.comm-empty p { color: var(--txt2); margin-bottom: 20px; }

/* Leaderboard */
.comm-lb-row { display: grid; grid-template-columns: 44px 36px 1fr 90px 70px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--bdr); }
.comm-lb-row:last-child { border-bottom: none; }
.comm-lb-rank { font-family: var(--fm); font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
.comm-lb-rank.gold   { color: #F59E0B; }
.comm-lb-rank.silver { color: #8FA3C0; }
.comm-lb-rank.bronze { color: #CD7F32; }
.comm-lb-sp   { font-family: var(--fm); font-size: 14px; font-weight: 700; color: var(--blue2); text-align: right; }
.comm-lb-posts{ font-size: 12px; color: var(--muted); text-align: right; }

/* Tier badge */
.comm-tier { font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; display: inline-block; }
.comm-tier-crawler   { background: rgba(71,85,105,.2); color: #94A3B8; border: 1px solid rgba(71,85,105,.3); }
.comm-tier-indexed   { background: rgba(37,99,235,.15); color: #3B82F6; border: 1px solid rgba(37,99,235,.25); }
.comm-tier-cited     { background: rgba(14,165,233,.15); color: #0EA5E9; border: 1px solid rgba(14,165,233,.25); }
.comm-tier-authority { background: rgba(16,185,129,.15); color: #10B981; border: 1px solid rgba(16,185,129,.25); }
.comm-tier-expert    { background: rgba(245,158,11,.15); color: #F59E0B; border: 1px solid rgba(245,158,11,.25); }
.comm-tier-luminary  { background: rgba(139,92,246,.15); color: #8B5CF6; border: 1px solid rgba(139,92,246,.25); }

/* Sign-in gate */
.comm-gate { text-align: center; padding: 60px 20px; background: var(--surf); border: 1px solid var(--bdr); border-radius: 12px; }
.comm-gate h2 { font-family: var(--fh); font-size: 22px; font-weight: 800; margin-bottom: 10px; color: var(--txt); }
.comm-gate p  { color: var(--txt2); margin-bottom: 24px; font-size: 14px; }

/* Responsive */
@media (max-width: 1100px) { .comm-3col { grid-template-columns: 190px 1fr 240px; } }
@media (max-width: 900px) {
  .comm-3col, .comm-2col { grid-template-columns: 1fr; padding-top: 16px; }
  .comm-sidebar { position: static; margin-bottom: 16px; }
  .comm-rail    { position: static; }
  .comm-sidebar__link { display: inline-flex; }
}
@media (max-width: 600px) {
  .comm-wrap { padding: 0 14px; }
  .comm-post-body { padding: 18px 16px; }
  .comm-form { padding: 18px 16px; }
}

/* ── Thumbs vote buttons ──────────────────────────────────────────────── */
.comm-vote__btn { font-size:20px; line-height:1; background:none; border:none; cursor:pointer; padding:4px 6px; border-radius:6px; transition:transform .15s,background .15s; color:var(--txt2); }
.comm-vote__btn:hover { background:var(--bdr2); transform:scale(1.15); }
.comm-vote__btn.active.up { filter:drop-shadow(0 0 4px #10b981); }
.comm-vote__btn.active.dn { filter:drop-shadow(0 0 4px #ef4444); }
.comm-vote__label { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-top:2px; }

/* ── Signal info box ─────────────────────────────────────────────────── */
.comm-signal-box { background:var(--surf); border:1px solid var(--bdr); border-radius:10px; padding:20px 24px; margin:24px 0; }
.comm-signal-box h4 { font-size:15px; font-weight:700; color:var(--txt); margin:0 0 10px; }
.comm-signal-box p { font-size:13px; color:var(--txt2); line-height:1.6; margin:0 0 14px; }
.comm-sp-table { display:grid; grid-template-columns:1fr auto; gap:6px 20px; }
.comm-sp-table div { display:contents; }
.comm-sp-table span { font-size:13px; color:var(--txt2); }
.comm-sp-table strong { font-size:13px; color:var(--green); font-weight:700; text-align:right; }

/* ── Best Answer ─────────────────────────────────────────────────────── */
.comm-comment.is-best { border:1px solid #10b981; border-radius:10px; background:#10b98108; }
.comm-best-badge { background:#10b98120; color:#10b981; border:1px solid #10b98140; font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px; display:inline-block; margin-bottom:8px; }
.comm-best-btn { background:none; border:1px solid var(--bdr2); color:var(--green); font-size:12px; padding:3px 10px; border-radius:6px; cursor:pointer; }
.comm-best-btn:hover { background:var(--bdr2); }

/* ── Attachments ─────────────────────────────────────────────────────── */
.comm-att-controls { margin-top:10px; }
.comm-att-label { display:inline-flex; align-items:center; gap:6px; background:var(--surf2); border:1px solid var(--bdr2); color:var(--txt2); padding:8px 14px; border-radius:8px; cursor:pointer; font-size:13px; }
.comm-att-label:hover { border-color:var(--blue2); color:var(--txt); }
.comm-att-preview { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.comm-att-thumb { position:relative; display:inline-block; }
.comm-att-thumb img { width:80px; height:80px; object-fit:cover; border-radius:8px; border:1px solid var(--bdr2); }
.comm-att-thumb span { font-size:12px; color:var(--txt2); background:var(--surf2); padding:6px 10px; border-radius:6px; display:block; }
.comm-att-remove { position:absolute; top:-6px; right:-6px; background:#ef4444; color:#fff; border:none; border-radius:50%; width:18px; height:18px; font-size:10px; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.comm-att-img { max-width:100%; border-radius:8px; margin-top:10px; border:1px solid var(--bdr); }
.comm-att-thumb-img { width:60px; height:60px; object-fit:cover; border-radius:6px; border:1px solid var(--bdr2); }
.comm-att-link { display:inline-flex; align-items:center; gap:6px; color:var(--blue2); font-size:13px; text-decoration:none; margin-top:8px; }
.comm-att-link:hover { text-decoration:underline; }
.comm-att-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; align-items:flex-start; }

/* ── Comment actions ─────────────────────────────────────────────────── */
.comm-comment__actions { display:flex; align-items:center; gap:8px; margin-left:auto; flex-wrap:wrap; }
.comm-comment__actions .comm-vote__btn { font-size:16px; padding:2px 4px; }
.comm-comment__actions .comm-vote__score { font-size:13px; }
.comm-edit-comment-btn, .comm-del-comment-btn { background:none; border:1px solid var(--bdr2); color:var(--txt2); font-size:12px; padding:3px 10px; border-radius:6px; cursor:pointer; }
.comm-edit-comment-btn:hover { border-color:var(--blue2); color:var(--blue2); }
.comm-del-comment-btn:hover { border-color:#ef4444; color:#ef4444; }

/* ── Activity page ───────────────────────────────────────────────────── */
.comm-activity-row { display:flex; align-items:center; gap:16px; padding:14px 16px; background:var(--surf); border:1px solid var(--bdr); border-radius:8px; margin-bottom:10px; }
.comm-activity-row:hover { border-color:var(--bdr2); }
.comm-activity-row__main { flex:1; min-width:0; }
.comm-activity-row__title { font-size:15px; font-weight:600; color:var(--txt); text-decoration:none; display:block; }
.comm-activity-row__title:hover { color:var(--blue2); }
.comm-activity-row__meta { display:flex; gap:12px; margin-top:6px; flex-wrap:wrap; font-size:13px; }
.comm-activity-row__actions { display:flex; gap:8px; flex-shrink:0; }

/* ── SP badge ────────────────────────────────────────────────────────── */
.comm-sp-badge { background:var(--surf2); border:1px solid var(--bdr2); color:var(--blue2); font-size:13px; padding:4px 12px; border-radius:20px; font-weight:600; }

/* ── Edit inputs ─────────────────────────────────────────────────────── */
.comm-edit-input { width:100%; font-size:inherit; font-weight:inherit; background:var(--surf2); border:1px solid var(--bdr2); color:var(--txt); padding:8px 12px; border-radius:6px; }
.comm-edit-textarea { width:100%; background:var(--surf2); border:1px solid var(--bdr2); color:var(--txt); padding:12px; border-radius:6px; resize:vertical; }

/* ── Misc button helpers ─────────────────────────────────────────────── */
.sgeo-btn-sm { font-size:12px; padding:5px 12px; border-radius:6px; border:1px solid var(--bdr2); cursor:pointer; font-weight:500; text-decoration:none; display:inline-flex; align-items:center; gap:4px; }
.sgeo-btn-secondary { background:var(--surf2); color:var(--txt2); }
.sgeo-btn-secondary:hover { border-color:var(--blue2); color:var(--blue2); }
.sgeo-btn-danger { background:none; color:#ef4444; border-color:#ef444430; }
.sgeo-btn-danger:hover { background:#ef444415; }

/* ── Toast ───────────────────────────────────────────────────────────── */
.sgeo-toast { position:fixed; bottom:24px; right:24px; padding:12px 20px; border-radius:10px; font-size:14px; font-weight:500; z-index:9999; opacity:0; transform:translateY(8px); transition:all .25s; pointer-events:none; }
.sgeo-toast.visible { opacity:1; transform:translateY(0); }
.sgeo-toast--ok { background:#10b981; color:#fff; }
.sgeo-toast--error { background:#ef4444; color:#fff; }

/* ══ Mobile Responsive ══════════════════════════════════════════ */
@media (max-width: 900px) {
  .comm-3col, .comm-2col { grid-template-columns: 1fr; padding-top: 16px; }
  .comm-sidebar { position: static; margin-bottom: 16px; }
  .comm-rail    { position: static; }
  .comm-sidebar__link { display: inline-flex; }
}

/* Post thread grid on mobile */
@media (max-width: 860px) {
  .comm-wrap > div[style*="grid-template-columns: 1fr 260px"] {
    grid-template-columns: 1fr !important;
  }
  .comm-wrap aside[style*="position:sticky"] {
    position: static !important;
  }
}

/* Nav on mobile */
@media (max-width: 768px) {
  .comm-nav-links li:nth-child(n+5) { display: none; }
  .comm-avatar-uname { display: none; }
}
@media (max-width: 520px) {
  .comm-nav-links { display: none; }
  .comm-topbar__logo em { display: none; }
  .comm-wrap { padding: 0 12px; }
}

/* Post card on mobile */
@media (max-width: 600px) {
  .comm-post-card { padding: 12px 14px; }
  .comm-post-card__inner { gap: 10px; }
  .comm-vote { width: 32px; }
  .comm-post-card__title { font-size: 14px; }
  .comm-post-card__footer { gap: 6px; }
}

/* Settings layout on mobile */
@media (max-width: 768px) {
  .settings-layout { grid-template-columns: 1fr !important; }
  .settings-nav { position: static !important; }
}

/* Profile stat grid on mobile */
@media (max-width: 480px) {
  .prof-stat-grid { grid-template-columns: 1fr 1fr !important; }
  .prof-avatar { width: 60px !important; height: 60px !important; font-size: 22px !important; }
}

/* Leaderboard table on mobile */
@media (max-width: 600px) {
  .comm-lb-row { grid-template-columns: 36px 28px 1fr 70px; }
  .comm-lb-posts { display: none; }
}

/* Combo tool grid on pricing */
@media (max-width: 600px) {
  .comm-post-body { padding: 14px 12px; }
  .comm-form { padding: 14px 12px; }
}

/* ══════════════════════════════════════════════
   MOBILE RESPONSIVE — Community
   ══════════════════════════════════════════════ */

/* Community nav responsive */
@media(max-width:768px) {
  .comm-topbar__inner { padding: 0 14px; }
  .comm-nav-links { gap: 0; }
  .comm-nav-links a { padding: 6px 8px; font-size: 12px; }
  .comm-nav-links a .comm-nav-icon { display: none; }
  .comm-avatar-uname { display: none; }
  .comm-back-link { display: none !important; }
}
@media(max-width:520px) {
  .comm-topbar__logo em { display: none; }
  .comm-nav-links li:last-child { display: none; } /* hide + Post from nav on tiny screens */
}

/* Feed 3-col → 2-col → 1-col */
@media(max-width:1100px) {
  .comm-3col { grid-template-columns: 190px 1fr 220px; }
}
@media(max-width:900px) {
  .comm-3col, .comm-2col { grid-template-columns: 1fr; padding-top: 16px; }
  .comm-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  .comm-sidebar__section { flex: 1 1 160px; margin-bottom: 0; }
  .comm-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .comm-rail-box { flex: 1 1 200px; }
}

/* Post card mobile */
@media(max-width:600px) {
  .comm-post-card { padding: 12px 14px; }
  .comm-post-card__inner { gap: 10px; }
  .comm-vote { width: 32px; }
  .comm-post-card__title { font-size: 14px; }
  .comm-post-card__excerpt { display: none; } /* hide on very small screens */
  .comm-post-card__footer { gap: 6px; }
}

/* Community hero responsive */
@media(max-width:600px) {
  .comm-hero { padding: 20px 0 16px; }
  .comm-hero h1 { font-size: 22px; }
  .comm-hero p { font-size: 13px; }
  .comm-hero__btns { gap: 8px; }
}

/* Tabs scrollable on mobile */
@media(max-width:600px) {
  .comm-tabs { margin-bottom: 10px; }
  .comm-tab { padding: 9px 10px; font-size: 12px; }
}

/* Wrap — tighter on mobile */
@media(max-width:480px) {
  .comm-wrap { padding: 0 12px; }
  .comm-post-body { padding: 14px 12px; }
  .comm-post-body h1 { font-size: 18px; }
  .comm-form { padding: 14px 12px; }
}

/* Profile page responsive */
@media(max-width:900px) {
  .prof-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:600px) {
  .prof-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .prof-avatar { width: 60px; height: 60px; font-size: 22px; }
}

/* Settings layout responsive */
@media(max-width:768px) {
  .settings-layout { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav { position: static; }
}

/* Leaderboard table responsive */
@media(max-width:600px) {
  .comm-lb-row { grid-template-columns: 36px 28px 1fr 70px; }
  .comm-lb-posts { display: none; }
}

/* Comment layout mobile */
@media(max-width:600px) {
  .comm-comment { flex-direction: column; gap: 8px; padding: 12px; }
  .comm-comment__av { display: none; }
  .comm-comment__actions { flex-wrap: wrap; gap: 4px; }
}

/* Post page layout responsive */
.comm-post-layout { display: grid; grid-template-columns: 1fr 260px; gap: 22px; align-items: start; }
.comm-post-sidebar { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 14px; }
@media(max-width:900px) {
  .comm-post-layout { grid-template-columns: 1fr; }
  .comm-post-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media(max-width:600px) {
  .comm-post-sidebar { grid-template-columns: 1fr; }
}
