/* Spaces: activity on every card, a Happening now list, and single-column rows on phones. */
#spaceDirectory .space-activity{display:flex;align-items:flex-start;gap:6px;margin-top:auto;font-size:var(--type-caption);line-height:1.3;color:var(--muted,#9fb0cf)}
#spaceDirectory .space-activity-dot,#spacesHappening .space-activity-dot{width:7px;height:7px;flex:none;margin-top:.38em;border-radius:50%;background:#7d8aa8;opacity:.7}
#spaceDirectory .space-activity.is-live{color:#47d79a}
#spaceDirectory .space-activity.is-live .space-activity-dot,#spacesHappening h3 .space-activity-dot{background:#2fd98b;opacity:1;box-shadow:0 0 0 0 #2fd98b88;animation:space-live 2s ease-out infinite}
@keyframes space-live{70%{box-shadow:0 0 0 6px #2fd98b00}100%{box-shadow:0 0 0 0 #2fd98b00}}
#spaceDirectory .space-latest{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:4px;font-size:var(--type-caption);line-height:1.35;color:var(--muted,#9fb0cf);font-style:normal}
#spaceDirectory .space-latest b{font-weight:650;color:var(--text,#e8eeff)}
#spaceDirectory .official-space-copy .space-activity{margin-top:auto}

#spacesHappening{margin:18px 0 6px}
#spacesHappening h3{display:flex;align-items:center;gap:8px}
#spacesHappening .happening-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--panel)}
#spacesHappening .happening-item{display:flex;flex-direction:column;gap:5px;padding:12px 14px;color:var(--text);text-decoration:none;border-top:1px solid var(--line)}
#spacesHappening .happening-item:first-child{border-top:0}
#spacesHappening .happening-item:hover,#spacesHappening .happening-item:focus-visible{background:var(--ui-hover,rgba(120,130,160,.08))}
#spacesHappening .happening-space{display:flex;align-items:center;gap:7px;font-size:var(--type-caption);min-width:0}
#spacesHappening .happening-space b{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#spacesHappening .happening-space small{color:var(--muted);margin-left:auto;flex:none}
#spacesHappening .happening-logo{display:grid;place-items:center;width:20px;height:20px;flex:none;border-radius:50%;overflow:hidden}
#spacesHappening .happening-logo :is(img,svg,.coinlogo,.space-badge){width:20px!important;height:20px!important;font-size:12px}
#spacesHappening .happening-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:var(--type-body);line-height:1.4}
#spacesHappening .happening-meta{display:flex;align-items:center;gap:12px;font-size:var(--type-caption);color:var(--muted)}
#spacesHappening .happening-meta span{display:inline-flex;align-items:center;gap:3px}
#spacesHappening .happening-meta svg{width:13px;height:13px}

@media(max-width:600px){
 #spaceDirectory #spaceGrid,#spaceDirectory #communityGrid{grid-template-columns:1fr!important;gap:10px!important}
 #spaceDirectory .official-discovery-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center}
 #spaceDirectory .official-space-main{flex-direction:row!important;align-items:center;gap:12px;padding:12px 0 12px 12px!important}
 #spaceDirectory .official-space-art{width:52px!important;height:52px!important;border-radius:14px;flex:none}
 #spaceDirectory .official-space-art::after{display:none}
 #spaceDirectory .official-coin{width:38px;height:38px;margin-top:0}
 #spaceDirectory .official-coin .coinlogo{width:32px!important;height:32px!important;font-size:24px}
 #spaceDirectory .official-coin svg{width:24px;height:24px}
 #spaceDirectory .official-space-copy{padding:0!important;margin:0!important;gap:2px}
 #spaceDirectory .official-space-copy h3{min-height:0!important;margin:0 0 2px!important}
 #spaceDirectory .official-space-copy p{min-height:0!important;-webkit-line-clamp:unset!important;display:block!important;margin:0 0 4px!important}
 #spaceDirectory .official-discovery-card>.directory-join{margin:0 12px 0 8px!important;min-height:36px;padding:0 14px;font-size:13px;width:auto!important;align-self:center}
 #spaceDirectory .official-discovery-card>.directory-card-status{grid-column:1/-1;margin:0 12px}
 #spaceDirectory .official-discovery-card>.directory-card-status:empty{display:none}
}
@media(prefers-reduced-motion:reduce){#spaceDirectory .space-activity-dot,#spacesHappening .space-activity-dot{animation:none!important}}
#spacesHappening h3 .space-activity-dot{margin-top:0}
