/* V16 Blackhole Chroma: responsive combined community cards */
html:not([data-mode="light"]){--hsg-bg:#030711;--hsg-surface:#08101e;--hsg-card:#0b1626;
 --hsg-border:rgba(129,166,221,.18);--hsg-muted:#adbed9;--hsg-text:#f1f6ff;
 --hsg-accent:#43def1;--hsg-glass-bg:rgba(10,18,34,.93);
 --hsg-glass-border:rgba(138,173,236,.19)}
body[data-hysocial-page="hysocial-groups"]{background:
 radial-gradient(ellipse at 85% -10%,rgba(122,54,176,.18),transparent 42%),
 radial-gradient(ellipse at 8% 100%,rgba(15,139,169,.12),transparent 44%),var(--hsg-bg)}
.hsg-sidebar{background:linear-gradient(145deg,rgba(35,37,74,.22),transparent 45%),var(--hsg-surface)}
.hsg-sidebar-header{min-height:70px}
.hsg-sidebar-header h2{font-size:15px;letter-spacing:0}
.hsg-v16-server-side{text-decoration:none;color:inherit}
.hsg-v16-server-side .hsg-v16-brand{width:35px;height:35px;flex-basis:35px;border-radius:9px}
.hsg-v16-server-side .hsg-v16-brand img{width:100%;height:100%;max-width:100%;max-height:100%}
.hsg-v16-server-side .hsg-v16-brand iconify-icon{font-size:20px}
.hsg-v16-side-title{padding:15px 16px 7px;font-size:10px;letter-spacing:.11em;font-weight:800;color:var(--hsg-muted)}
.hsg-v16-empty-side{padding:10px 16px;color:var(--hsg-muted);font-size:11px}
.hsg-discover{width:100%;padding:28px clamp(17px,3vw,42px) 86px}
.hsg-discover-header{padding:5px 0 14px}
.hsg-discover-header h1{font-size:clamp(27px,3vw,37px);letter-spacing:-.035em}
.hsg-discover-header p{font-size:13px;margin-top:8px}
.hsg-v16-hub-name{background:linear-gradient(95deg,#44dff1,#b18aff);color:transparent;background-clip:text;-webkit-background-clip:text}
.hsg-v16-back{display:inline-flex;gap:8px;align-items:center;font-weight:700;color:var(--hsg-muted);font-size:12px;margin-bottom:21px;text-decoration:none}
.hsg-v16-back:hover{color:var(--hsg-accent)}
.hsg-v16-status{font-size:11px;color:var(--hsg-muted);margin-top:13px}
.hsg-discover>.hsg-search{max-width:660px}
.hsg-discover .hsg-search input{height:45px;border-radius:13px}
.hsg-cat-row{gap:7px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px;scrollbar-width:thin;margin-bottom:23px}
.hsg-cat-pill{flex-shrink:0;border-radius:11px;min-height:40px;padding:7px 13px}
.hsg-featured-section h3{font-size:16px;margin-bottom:16px}
.hsg-v16-result-count{font-size:11px;color:var(--hsg-muted);font-weight:500;margin-left:auto}
.hsg-groups-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px}
.hsg-groups-grid .hsg-v16-card{appearance:none;display:flex;flex-direction:column;
 width:100%;min-width:0;min-height:238px;text-align:left;text-decoration:none;color:var(--hsg-text);
 background:linear-gradient(145deg,rgba(49,91,140,.13),transparent 56%),var(--hsg-glass-bg);
 border:1px solid var(--hsg-glass-border);border-radius:19px;padding:0;overflow:hidden;cursor:pointer;
 font:inherit;box-shadow:0 7px 28px rgba(0,0,0,.14);transition:transform .2s,border-color .2s,box-shadow .2s}
.hsg-groups-grid .hsg-v16-card:hover{transform:translateY(-3px);border-color:rgba(66,221,248,.58);box-shadow:0 11px 36px rgba(0,0,0,.3),0 0 20px rgba(66,221,248,.08)}
.hsg-v16-card:focus-visible,.hsg-v16-back:focus-visible,.hsg-cat-pill:focus-visible{outline:2px solid var(--hsg-accent);outline-offset:3px}
.hsg-v16-card-hero{position:relative;height:125px;display:flex;gap:13px;align-items:center;
 padding:24px 16px;background:radial-gradient(circle at 15% 25%,rgba(43,209,240,.17),transparent 55%),
 linear-gradient(125deg,rgba(18,63,96,.45),rgba(8,13,28,.79));border-bottom:1px solid var(--hsg-border)}
.hsg-v16-group .hsg-v16-card-hero{background:radial-gradient(circle at 12% 14%,rgba(162,98,239,.2),transparent 60%),
 linear-gradient(125deg,rgba(48,27,78,.48),rgba(8,13,28,.78))}
.hsg-v16-brand{width:64px;height:64px;flex:0 0 64px;display:flex;align-items:center;justify-content:center;
 background:rgba(3,8,18,.78);border:1px solid rgba(190,209,245,.25);border-radius:17px;overflow:hidden}
.hsg-v16-brand img{max-width:90%;max-height:90%;width:auto;height:auto;object-fit:contain;border-radius:5px}
.hsg-v16-brand iconify-icon,.hsg-v16-emoji{font-size:29px;color:var(--hsg-accent)}
.hsg-v16-card-title{min-width:0;display:flex;flex-direction:column;gap:7px}
.hsg-v16-card-eyebrow{font-size:9px;font-weight:800;letter-spacing:.1em;color:#8be9f4}
.hsg-v16-group .hsg-v16-card-eyebrow{color:#d5b6ff}
.hsg-v16-card-title strong{font-size:clamp(14px,1.35vw,18px);font-weight:850;letter-spacing:-.015em;line-height:1.3;overflow-wrap:anywhere}
.hsg-v16-card-tag{position:absolute;top:8px;right:8px;padding:4px 8px;color:#e5edff;
 font-size:10px;border:1px solid rgba(193,210,242,.2);border-radius:7px;background:rgba(2,7,17,.68);text-transform:capitalize}
.hsg-v16-card-body{padding:15px 16px;display:flex;flex-direction:column;gap:18px;flex:1}
.hsg-v16-card-description{color:var(--hsg-muted);font-size:12px;line-height:1.5;
 display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px}
.hsg-v16-card-footer{margin-top:auto;display:flex;gap:10px;align-items:center;justify-content:space-between}
.hsg-v16-members{font-size:11px;display:inline-flex;gap:5px;align-items:center;color:var(--hsg-muted);white-space:nowrap}
.hsg-v16-cta{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--hsg-accent);font-weight:750;white-space:nowrap}
.hsg-v16-empty{grid-column:1/-1;border:1px solid var(--hsg-border);border-radius:18px;padding:38px 20px;text-align:center}
.hsg-v16-empty>iconify-icon{display:block;font-size:30px;color:var(--hsg-accent);margin-bottom:12px}
.hsg-v16-empty h3{display:block;margin:12px 0}
.hsg-v16-empty p{color:var(--hsg-muted);margin-bottom:15px}
.hsg-group-banner{background:linear-gradient(125deg,rgba(35,146,177,.19),rgba(117,51,178,.21)),var(--hsg-bg)}
.hsg-group-banner img{object-fit:contain!important;background:rgba(3,7,17,.92)}
html[data-mode="light"] .hsg-v16-card{background:#fff;border-color:rgba(34,57,92,.2)}
html[data-mode="light"] .hsg-v16-card-body{color:#1d2840}
html[data-mode="light"] .hsg-v16-card-description{color:#4c5972}
@media(max-width:768px){
 .hsg-discover{padding:18px 16px 105px}
 .hsg-discover-header{padding-left:43px}
 .hsg-discover-header h1{font-size:27px}
 .hsg-v16-back{margin-bottom:15px}
 .hsg-cat-row{margin-right:-16px;padding-right:16px}
 .hsg-mobile-toggle{top:62px!important;z-index:101!important}
 .hsg-groups-grid .hsg-v16-card{min-height:222px}
 .hsg-v16-card-hero{height:116px}
}
@media(max-width:460px){
 .hsg-groups-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .hsg-v16-card-hero{height:112px}
 .hsg-v16-brand{width:55px;height:55px;flex-basis:55px}
 .hsg-v16-card-title strong{font-size:16px}
 .hsg-featured-section h3{font-size:15px}
}
@media(prefers-reduced-motion:reduce){.hsg-groups-grid .hsg-v16-card{transition:none}}

/* V16 top-edge alignment, 2026-11-18: nav.js explicitly disables the old
   global top bar. The legacy group shell still reserved its former 52px. */
body[data-hysocial-page="hysocial-groups"] .hsg-app{
  padding-top:0;
  height:100dvh;
}
@media(max-width:768px){
  body[data-hysocial-page="hysocial-groups"] .hsg-app{
    padding-top:env(safe-area-inset-top,0px);
  }
  body[data-hysocial-page="hysocial-groups"] .hsg-sidebar{
    top:env(safe-area-inset-top,0px) !important;
  }
  body[data-hysocial-page="hysocial-groups"] .hsg-mobile-toggle{
    top:calc(10px + env(safe-area-inset-top,0px)) !important;
  }
}
