/* Spaces home / Explore / Joined Spaces / Invites (chats1, 21 Oct 2026) — the app's CommunitiesHome family.
   Every colour comes from the theme variables, so the panel carries its own ink in dark and light. */
body.on-spaces .main-wrap { max-width:none; margin-left:var(--sidebar-w); margin-right:0; padding:12px 24px 32px; }
#spacesHubPage { color:var(--text); }
#spacesHubPage .sh-page { max-width:860px; margin:0 auto; padding:8px 0 40px; color:var(--text); }
#spacesHubPage .sh-header { display:flex; align-items:flex-start; gap:12px; margin-bottom:14px; }
#spacesHubPage .sh-heading { flex:1; min-width:0; }
#spacesHubPage .sh-heading h1 { margin:0; font-size:28px; font-weight:800; letter-spacing:-.8px; color:var(--text); }
#spacesHubPage .sh-heading p { margin:4px 0 0; color:var(--text2); font-size:14px; }
#spacesHubPage .sh-back, #spacesHubPage .sh-create { flex:0 0 auto; width:38px; height:38px; border-radius:999px; display:grid; place-items:center; cursor:pointer; }
#spacesHubPage .sh-back { border:1px solid var(--border2); background:var(--bg2); color:var(--text); margin-top:2px; }
#spacesHubPage .sh-back svg { width:20px; height:20px; }
#spacesHubPage .sh-create { border:0; background:var(--accent-gradient, var(--accent-strong)); color:#fff; font-size:22px; font-weight:700; }
#spacesHubPage .sh-search-pill, #spacesHubPage .sh-search { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:0 14px; border-radius:22px; border:1px solid var(--border2); background:var(--bg2); color:var(--text3); font:inherit; font-size:14px; cursor:pointer; text-align:left; }
#spacesHubPage .sh-search { cursor:text; }
#spacesHubPage .sh-search input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--text); font:inherit; font-size:14px; }
#spacesHubPage .sh-search input::placeholder { color:var(--text3); }
#spacesHubPage .sh-section-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-top:24px; }
#spacesHubPage .sh-section-title { margin:24px 0 10px; font-size:18px; font-weight:800; letter-spacing:-.4px; color:var(--text); }
#spacesHubPage .sh-section-head .sh-section-title { margin:0 0 10px; }
#spacesHubPage .sh-section-title small { margin-left:6px; font-size:12px; font-weight:500; color:var(--text3); letter-spacing:0; }
#spacesHubPage .sh-link { border:0; background:none; color:var(--accent-strong); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
#spacesHubPage .sh-hero { position:relative; display:block; width:100%; min-height:200px; border:0; border-radius:18px; overflow:hidden; padding:0; cursor:pointer; background:linear-gradient(120deg,#33204a,#5c3f80 32%,#8f74b8 55%,#4d3268 78%,#241535); color:#fff; text-align:left; }
#spacesHubPage .sh-hero-cover, #spacesHubPage .sh-hero-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
#spacesHubPage .sh-hero::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg,rgba(18,7,32,.25),rgba(18,7,32,.1) 34%,rgba(18,7,32,.72) 74%,rgba(14,5,26,.92)); }
#spacesHubPage .sh-owner-chip { position:absolute; top:12px; right:12px; z-index:1; padding:3px 9px; border-radius:999px; background:#fff; color:#2b1747; font-size:11px; font-weight:800; letter-spacing:.3px; }
#spacesHubPage .sh-hero-copy { position:absolute; left:16px; right:16px; bottom:16px; z-index:1; display:flex; align-items:flex-end; gap:12px; }
#spacesHubPage .sh-hero-avatar { width:64px; height:64px; flex:0 0 64px; border-radius:999px; border:3px solid #fff; overflow:hidden; display:grid; place-items:center; background:#7a4fa8; font-weight:800; font-size:22px; color:#fff; }
#spacesHubPage .sh-hero-avatar img { width:100%; height:100%; object-fit:cover; }
#spacesHubPage .sh-hero-text { display:grid; gap:3px; min-width:0; color:#fff; }
#spacesHubPage .sh-hero-text strong { font-size:20px; color:#fff; }
#spacesHubPage .sh-hero-text small { color:rgba(255,255,255,.92); font-size:13px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
#spacesHubPage .sh-hero-text em { font-style:normal; color:rgba(255,255,255,.94); font-size:13px; font-weight:600; }
#spacesHubPage .sh-rail { display:flex; gap:14px; overflow-x:auto; padding:2px 2px 8px; scrollbar-width:thin; }
#spacesHubPage .sh-circle { flex:0 0 84px; display:grid; justify-items:center; gap:7px; border:0; background:none; color:var(--text); font:inherit; font-size:12px; font-weight:700; cursor:pointer; text-align:center; }
#spacesHubPage .sh-circle-img { width:66px; height:66px; border-radius:999px; overflow:hidden; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-strong); font-size:22px; border:2px solid var(--accent-strong); }
#spacesHubPage .sh-circle-img img { width:100%; height:100%; object-fit:cover; }
#spacesHubPage .sh-circle > span:last-child { max-width:84px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#spacesHubPage .sh-discover { gap:10px; }
#spacesHubPage .sh-discover-card, #spacesHubPage .sh-explore-card { position:relative; border:0; border-radius:12px; overflow:hidden; padding:0; cursor:pointer; color:#fff; text-align:left; background:linear-gradient(160deg,#5c3f80,#241535); font:inherit; }
#spacesHubPage .sh-discover-card { flex:0 0 190px; height:150px; }
#spacesHubPage .sh-discover-cover, #spacesHubPage .sh-discover-cover img, #spacesHubPage .sh-explore-cover, #spacesHubPage .sh-explore-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
#spacesHubPage .sh-discover-card::after, #spacesHubPage .sh-explore-card::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg,rgba(10,4,20,.14),rgba(10,4,20,.12) 38%,rgba(10,4,20,.88)); }
#spacesHubPage .sh-pill { position:absolute; top:8px; left:8px; z-index:1; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.22); color:#fff; font-size:10px; font-weight:700; }
#spacesHubPage .sh-discover-copy, #spacesHubPage .sh-explore-copy { position:absolute; left:10px; right:10px; bottom:9px; z-index:1; display:grid; gap:2px; color:#fff; }
#spacesHubPage .sh-discover-copy strong, #spacesHubPage .sh-explore-copy strong { font-size:13px; color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#spacesHubPage .sh-discover-copy small { font-size:11px; color:rgba(255,255,255,.86); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#spacesHubPage .sh-discover-copy em, #spacesHubPage .sh-explore-copy small { font-style:normal; font-size:11px; color:rgba(255,255,255,.94); }
#spacesHubPage .sh-invites-row { display:flex; align-items:center; gap:12px; width:100%; padding:12px 14px; border-radius:14px; border:1px solid var(--border2); background:var(--bg2); color:var(--text); font:inherit; cursor:pointer; text-align:left; }
#spacesHubPage .sh-invites-row > span:nth-child(2) { flex:1; display:grid; }
#spacesHubPage .sh-invites-row small { color:var(--accent-strong); font-weight:600; }
#spacesHubPage .sh-invites-icon { width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:var(--accent-soft); color:var(--accent-strong); }
#spacesHubPage .sh-chips { display:flex; gap:8px; overflow-x:auto; padding:14px 0 4px; }
#spacesHubPage .sh-chip { flex:0 0 auto; padding:7px 14px; border-radius:999px; border:1px solid var(--border2); background:var(--bg2); color:var(--text2); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
#spacesHubPage .sh-chip[aria-pressed="true"] { background:var(--accent-strong); border-color:transparent; color:#fff; }
#spacesHubPage .sh-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; }
#spacesHubPage .sh-explore-card { height:140px; }
#spacesHubPage .sh-private { left:auto; right:8px; }
#spacesHubPage .sh-count { margin:16px 0 10px; font-weight:800; font-size:15px; color:var(--text); }
#spacesHubPage .sh-joined-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
#spacesHubPage .sh-joined-card { display:grid; border:1px solid var(--border2); border-radius:14px; overflow:hidden; padding:0; background:var(--bg2); color:var(--text); text-align:left; font:inherit; cursor:pointer; }
#spacesHubPage .sh-joined-cover { height:110px; background:linear-gradient(160deg,#8f74b8,#33204a); }
#spacesHubPage .sh-joined-cover img { width:100%; height:100%; object-fit:cover; display:block; }
#spacesHubPage .sh-joined-copy { display:grid; gap:3px; padding:10px 12px 12px; }
#spacesHubPage .sh-joined-copy strong { color:var(--text); }
#spacesHubPage .sh-joined-copy small { color:var(--text3); }
#spacesHubPage .sh-role { justify-self:start; padding:2px 8px; border-radius:999px; background:var(--accent-soft); color:var(--accent-strong); font-size:10px; font-weight:800; letter-spacing:.3px; }
#spacesHubPage .sh-discover-more { display:block; width:100%; margin-top:14px; padding:12px; border-radius:14px; border:1px dashed var(--accent-strong); background:var(--accent-softer, transparent); color:var(--accent-strong); font:inherit; font-weight:700; cursor:pointer; }
#spacesHubPage .sh-eyebrow { margin:18px 0 8px; color:var(--text3); font-size:12px; font-weight:700; letter-spacing:.3px; }
#spacesHubPage .sh-invites { display:grid; gap:10px; }
#spacesHubPage .sh-invite { padding:12px; border-radius:14px; border:1px solid var(--border2); background:var(--bg2); color:var(--text); }
#spacesHubPage .sh-invite-head { display:flex; align-items:center; gap:10px; }
#spacesHubPage .sh-invite-head > span:last-child { display:grid; min-width:0; }
#spacesHubPage .sh-invite-head small { color:var(--text2); }
#spacesHubPage .sh-invite-avatar { width:40px; height:40px; flex:0 0 40px; border-radius:12px; overflow:hidden; display:grid; place-items:center; background:var(--accent-strong); color:#fff; font-weight:800; }
#spacesHubPage .sh-invite-avatar img { width:100%; height:100%; object-fit:cover; }
#spacesHubPage .sh-invite-actions { display:flex; gap:8px; margin-top:10px; }
#spacesHubPage .sh-invite-actions .sh-button { flex:1; }
#spacesHubPage .sh-button { min-height:38px; padding:8px 14px; border-radius:10px; border:1px solid var(--border2); background:var(--bg3); color:var(--text); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
#spacesHubPage .sh-primary { background:var(--accent-strong); border-color:transparent; color:#fff; }
#spacesHubPage .sh-button:disabled { opacity:.6; }
#spacesHubPage .sh-state { margin-top:6px; padding:22px 16px; border-radius:14px; border:1px solid var(--border2); background:var(--bg2); text-align:center; color:var(--text2); }
#spacesHubPage .sh-state strong { display:block; color:var(--text); font-size:15px; }
#spacesHubPage .sh-state p { margin:6px 0 0; color:var(--text2); font-size:13px; }
#spacesHubPage .sh-state .sh-button { margin-top:12px; }
#spacesHubPage .sh-invites-empty { border-style:dashed; }
#spacesHubPage .sh-state-actions { display:flex; justify-content:center; gap:8px; }
#spacesHubPage .sh-skeleton { display:grid; gap:10px; }
#spacesHubPage .sh-skeleton span { display:block; height:110px; border-radius:14px; background:var(--bg3); animation:shPulse 1.2s ease-in-out infinite alternate; }
@keyframes shPulse { from { opacity:.55; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) { #spacesHubPage .sh-skeleton span { animation:none; } }
@media (max-width: 768px) {
  body.on-spaces .main-wrap { margin-left:0; padding:8px 12px 24px; }
  #spacesHubPage .sh-heading h1 { font-size:24px; }
  #spacesHubPage .sh-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  #spacesHubPage .sh-explore-card { height:112px; }
  #spacesHubPage .sh-joined-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #spacesHubPage .sh-discover-card { flex-basis:150px; height:119px; }
}
#spacesHubPage .sh-list { display:grid; gap:8px; margin-top:14px; }
#spacesHubPage .sh-space-row { display:flex; align-items:center; gap:12px; width:100%; padding:10px 12px; border-radius:14px; border:1px solid var(--border2); background:var(--bg2); color:var(--text); font:inherit; text-align:left; cursor:pointer; }
#spacesHubPage .sh-space-row strong { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
