/*
 * Community pages styling (F12 + future tenants). Scoped to .community-*
 * so it can't leak into the rest of the dashboard.
 *
 * The accent colour is provided by each community's settings via the
 * inline `style="--c-accent: #..."` on .community-page. Everything else
 * derives from that one variable so a community can re-skin by
 * changing a single hex.
 */

.community-page {
  --c-accent: #6366f1;
  --c-bg-0: #0a0c11;
  --c-bg-1: #11141b;
  --c-bg-2: #161a23;
  --c-bg-3: #1c2230;
  --c-border: rgba(255,255,255,0.10);
  --c-border-strong: rgba(255,255,255,0.14);
  --c-fg-1: #f1f5f9;
  --c-fg-2: rgba(241,245,249,0.78);
  --c-fg-3: rgba(241,245,249,0.55);
  --c-fg-4: rgba(241,245,249,0.40);
  --c-danger: #ff4757;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  /* Glass-morphism cribbed from the landing-page streamer cards — the
     165° gradient + dark slate baseline + soft blur produces the
     polished "shadcn / vite" look the rest of MarkSoft uses. */
  --c-glass-bg:        linear-gradient(165deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 45%, rgba(15,23,42,0.45) 100%);
  --c-glass-bg-hover:  linear-gradient(165deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 45%, rgba(15,23,42,0.50) 100%);
  --c-glass-blur:      blur(22px) saturate(1.28);
  --c-glass-shadow:    0 8px 32px rgba(0,0,0,0.28);
  --c-glass-inset:     inset 0 1px 0 rgba(255,255,255,0.10);
  --c-glow-accent:     0 12px 40px color-mix(in srgb, var(--c-accent) 22%, transparent), 0 0 20px color-mix(in srgb, var(--c-accent) 10%, transparent);
  --c-glow-live:       0 12px 40px rgba(255,71,87,0.22), 0 0 24px rgba(255,71,87,0.12);
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--c-accent) 8%, transparent), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(15,23,42,0.4), transparent 50%),
    var(--c-bg-0);
  background-attachment: fixed;
  color: var(--c-fg-1);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* The old top auth strip was retired 2026-05-13 — the sign-in / user
   chip now lives in the hero actions row next to the Apply CTA. */

/* ─── Owner-set body background image ─────────────────────────────
   Activated by .community-page--has-bg when community.backgroundImage
   is non-empty. We lay the image fixed-cover behind everything, then
   stack a tinted overlay on top so cards stay readable on bright or
   busy artwork. The existing radial-gradient noise from .community-page
   still shows through the overlay at low opacity, preserving the
   accent-tinted ambient look. */
.community-page--has-bg {
  background: var(--c-bg-0);    /* fallback colour for tall pages */
}
.community-page--has-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--c-page-bg);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}
.community-page--has-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--c-accent) 10%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(10,12,17,0.78) 0%, rgba(10,12,17,0.88) 100%);
}

/* ─── Disclaimer footer block (home page only) ──────────────────
   Owner-set recruitmentInfo string, rendered as a small muted note
   so legal-style disclaimers ("not affiliated with X") don't grab
   the same attention as the main content. */
.community-section--disclaimer {
  margin-top: 18px;
}
.community-disclaimer {
  padding: 14px 18px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--c-fg-3);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  text-align: center;
  letter-spacing: 0.01em;
}

/* ─── Image picker widget (Settings) ─── */
.img-picker {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--c-border);
  border-radius: 12px;
}
.img-picker__preview {
  width: 96px; height: 96px;
  border-radius: 10px;
  background: var(--c-bg-3) center/cover no-repeat;
  border: 1px solid var(--c-border);
  display: grid; place-items: center;
  color: var(--c-fg-4);
  font-size: 28px;
}
.img-picker[data-kind="banner"] .img-picker__preview {
  /* Banners are wide; show them in 16:9 instead of square. */
  width: 160px; height: 90px;
}
.img-picker[data-kind="banner"] {
  grid-template-columns: 160px 1fr;
}
.img-picker__body { min-width: 0; }
.img-picker__name {
  font-size: 14px; font-weight: 600;
  color: var(--c-fg-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.img-picker__meta {
  font-size: 11px; color: var(--c-fg-4);
  margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.img-picker__actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.img-picker__actions .community-btn {
  padding: 6px 12px;
  font-size: 12px;
}
@media (max-width: 540px) {
  .img-picker, .img-picker[data-kind="banner"] { grid-template-columns: 1fr; }
  .img-picker__preview, .img-picker[data-kind="banner"] .img-picker__preview {
    width: 100%; aspect-ratio: 16/9; height: auto;
  }
}

/* ─── Top hero ─── */
.community-hero {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-color: var(--c-bg-1);
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
}
.community-hero--video {
  /* Slightly taller when a video is playing — gives motion room without
     leaving acres of empty space above the content. */
  min-height: 260px;
}
.community-hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;        /* clicks pass through to actions */
}
.community-hero__overlay {
  position: absolute; inset: 0;
  z-index: 1;
  /* Lighter overlay than before — too-dark gradient hid the video
     entirely. Now the top is mostly transparent so the video shows,
     bottom fades to ~88% for hero text legibility. */
  background:
    radial-gradient(ellipse at 12% 120%, color-mix(in srgb, var(--c-accent) 22%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, rgba(11,13,18,0.05) 0%, rgba(11,13,18,0.35) 55%, rgba(11,13,18,0.88) 100%);
}
.community-hero::before {
  /* Subtle pattern grid for texture. Pure CSS, doesn't hit the network. */
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.community-hero__inner { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  /* Respect the OS-level "reduce motion" setting — pause the video. */
  .community-hero__video { display: none; }
}
.community-hero__inner {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 32px 22px;
  display: flex;
  align-items: flex-end;
  gap: 22px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .community-hero__inner { padding: 22px 18px 16px; }
}
.community-hero__logo {
  width: 104px; height: 104px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.16);
  display: grid; place-items: center;
  font-size: 36px; font-weight: 800;
  letter-spacing: -.04em;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 14px 36px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset, 0 0 28px color-mix(in srgb, var(--c-accent) 35%, transparent);
  position: relative;
}
.community-hero__logo::after {
  /* Subtle accent-color glow halo behind the logo */
  content: '';
  position: absolute; inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--c-accent), transparent 60%);
  z-index: -1;
  filter: blur(14px);
  opacity: 0.6;
}
.community-hero__logo img { width: 100%; height: 100%; object-fit: cover; }
.community-hero__id { flex: 1; min-width: 260px; }
.community-hero__name {
  /* Oswald — bold condensed, gives the page an esports / sports-bar
     feel that suits "F12 Kick Fam" better than the generic Inter
     display weight. crit-gaming.com uses Oswald for the same reason. */
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 44px; font-weight: 700; letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 6px;
  background: linear-gradient(135deg, #ffffff 30%, color-mix(in srgb, var(--c-accent) 75%, #ffffff));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.community-hero__tagline {
  font-size: 16px; color: var(--c-fg-2);
  margin: 0 0 14px;
  max-width: 540px;
}
.community-hero__stats {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--c-fg-3);
}
.community-hero__stat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: 999px;
}
.community-hero__stat i { color: var(--c-accent); font-size: 11px; }
.community-hero__stat strong { color: var(--c-fg-1); font-weight: 700; }
.community-hero__stat--live { color: var(--c-fg-1); border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.10); }
.community-hero__stat--live strong { color: var(--c-danger); }
.community-hero__live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--c-danger);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.7);
  animation: c-live-pulse 1.6s ease-in-out infinite;
}
@keyframes c-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  50%      { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.community-hero__actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center;
}
.community-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  background: rgba(255,255,255,0.04);
  color: var(--c-fg-1);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.community-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.20); transform: translateY(-1px); }

.community-btn--primary {
  background: linear-gradient(135deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 70%, #fff));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(99,102,241,0.35), inset 0 1px 0 rgba(255,255,255,0.22);
}
.community-btn--primary:hover { filter: brightness(1.08); box-shadow: 0 10px 28px rgba(99,102,241,0.5), inset 0 1px 0 rgba(255,255,255,0.22); transform: translateY(-2px); }

.community-btn--kick {
  background: linear-gradient(135deg, #53d637, #45b82d);
  border-color: transparent;
  color: #0a1310;
  box-shadow: 0 4px 14px rgba(83,214,55,0.25), inset 0 1px 0 rgba(255,255,255,0.25);
}
.community-btn--kick:hover { filter: brightness(1.06); transform: translateY(-1px); }

.community-btn--ghost { background: transparent; }
.community-btn--icon {
  width: 40px; height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--c-fg-2);
}
.community-btn--icon:hover { color: #fff; border-color: var(--c-accent); transform: translateY(-1px) scale(1.05); }

/* User chip — logged-in identity in the hero actions row */
.community-userchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--c-border);
  color: var(--c-fg-1);
  font-size: 13px; font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.community-userchip img,
.community-userchip > i:first-child {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-bg-3);
  display: grid; place-items: center;
  color: var(--c-fg-3);
  flex-shrink: 0;
}
.community-userchip__signout {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  margin-left: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  color: var(--c-fg-3);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.community-userchip__signout:hover { background: rgba(239,68,68,0.18); color: #fca5a5; }

/* ─── Tabs ─── */
.community-tabs {
  border-bottom: 1px solid var(--c-border);
  background: rgba(17,20,27,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.community-tabs__inner {
  max-width: 1180px; margin: 0 auto;
  padding: 0 24px;
  display: flex; gap: 4px; overflow-x: auto;
}
.community-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 18px;
  color: var(--c-fg-3);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
.community-tab::after {
  content: '';
  position: absolute;
  left: 18px; right: 18px;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.community-tab:hover { color: var(--c-fg-1); }
.community-tab:hover::after { transform: scaleX(0.5); }
.community-tab.is-active { color: var(--c-fg-1); }
.community-tab.is-active::after { transform: scaleX(1); }
.community-tab__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 6px;
  background: var(--c-danger);
  color: #fff;
  border-radius: 9px;
  font-size: 11px; font-weight: 700;
}

/* ─── Page body ─── */
.community-body {
  max-width: 1240px; margin: 0 auto;
  padding: 44px 32px 80px;
}
@media (max-width: 720px) {
  .community-body { padding: 28px 18px 60px; }
}
.community-section { margin-bottom: 56px; animation: c-fade-up .45s cubic-bezier(.4,0,.2,1) both; }
.community-section:nth-child(2) { animation-delay: .06s; }
.community-section:nth-child(3) { animation-delay: .12s; }
.community-section:nth-child(4) { animation-delay: .18s; }
.community-section:nth-child(5) { animation-delay: .24s; }
@keyframes c-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.community-section__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}
.community-section__title {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 28px; font-weight: 600; letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
  color: var(--c-fg-1);
  line-height: 1.15;
}
.community-section__sub {
  font-size: 13px; color: var(--c-fg-3);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 500;
  transition: color .15s ease, transform .15s ease;
}
.community-section__sub:hover {
  color: color-mix(in srgb, var(--c-accent) 75%, #fff);
  transform: translateX(2px);
}
.community-card {
  position: relative;
  background: var(--c-glass-bg);
  backdrop-filter: var(--c-glass-blur);
  -webkit-backdrop-filter: var(--c-glass-blur);
  border: 1px solid var(--c-border-strong);
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: var(--c-glass-shadow), var(--c-glass-inset);
  overflow: hidden;
}
.community-card::before {
  /* Top-edge accent stripe. Visible by default at low opacity (sets the
     brand tone) and intensifies on hover. Mirrors the landing-page
     streamer-card pattern. */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--c-accent), color-mix(in srgb, var(--c-accent) 60%, #fff), var(--c-accent), transparent);
  opacity: 0.55;
  transition: opacity .3s ease;
}
.community-card:hover::before { opacity: 1; }
.community-card + .community-card { margin-top: 16px; }

/* ─── Live + chat shell ─── */
/* Two-column layout: the live grid sits on the left, the unified
   community chat on the right. On narrow viewports the chat collapses
   underneath the grid so the whole thing reads top-to-bottom on phones. */
.live-with-chat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1080px) {
  .live-with-chat { grid-template-columns: 1fr; }
  .chat-panel { max-height: 520px; }
}

/* ─── Live strip ─── */
.live-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
/* Card-size variants — driven by the S/M/L toggle above the strip.
   Only the minmax floor changes; auto-fill still adapts to viewport
   width so the grid stays responsive at every size. */
.live-strip--sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.live-strip--md { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.live-strip--lg { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 24px; }

/* Size toggle pill — sits in the section head next to the "click to
   open" sub-text. Compact so it doesn't compete with the heading. */
.live-size-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border, rgba(255,255,255,0.10));
  border-radius: 999px;
}
.live-size-toggle__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px 0 10px;
  font-size: 11px;
  color: var(--c-fg-3, #94a3b8);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.live-size-toggle__label i { font-size: 10px; opacity: 0.7; }
.live-size-toggle button {
  width: 28px; height: 26px;
  display: grid; place-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-fg-2, #cbd5e1);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.live-size-toggle button:hover { background: rgba(255,255,255,0.06); }
.live-size-toggle button.active {
  background: rgba(255,71,87,0.18);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,71,87,0.45) inset;
}
.live-card {
  position: relative;
  background: var(--c-glass-bg);
  backdrop-filter: var(--c-glass-blur);
  -webkit-backdrop-filter: var(--c-glass-blur);
  border: 1px solid var(--c-border-strong);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.4,0,.2,1), box-shadow .28s ease, border-color .28s ease;
  box-shadow: var(--c-glass-shadow), var(--c-glass-inset);
}
.live-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,71,87,0.6);
  box-shadow: var(--c-glow-live), var(--c-glass-inset);
}

/* Stream thumbnail at the top — the real visual content of the card */
.live-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--c-bg-2) center / cover no-repeat;
  background-image:
    linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 18%, transparent), transparent 60%),
    radial-gradient(ellipse at center, color-mix(in srgb, var(--c-accent) 12%, transparent), transparent 70%);
  border-bottom: 1px solid var(--c-border);
  display: block;
  overflow: hidden;
}
.live-card__thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}

/* LIVE pill — top-left of the thumbnail */
.live-card__live-pill {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--c-danger);
  color: #fff;
  border-radius: 5px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(255,71,87,0.4);
}
.live-card__live-pill .live-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: c-live-pulse 1.6s ease-in-out infinite;
}
/* Viewer pill — top-right of the thumbnail */
.live-card__viewers-pill {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border-radius: 5px;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.live-card__viewers-pill i { font-size: 10px; opacity: 0.85; }
/* Uptime pill — bottom-left */
.live-card__uptime-pill {
  position: absolute; bottom: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  font-size: 11px; font-weight: 600;
  background: rgba(0,0,0,0.7);
  color: rgba(255,255,255,0.92);
  border-radius: 5px;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.live-card__uptime-pill i { font-size: 9px; opacity: 0.75; }

.live-card__head {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px 10px;
}
.live-card__external {
  margin-left: auto;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  color: var(--c-fg-3);
  text-decoration: none;
  font-size: 12px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  flex-shrink: 0;
}
.live-card__external:hover { background: rgba(255,71,87,0.12); color: var(--c-danger); border-color: rgba(255,71,87,0.4); }
.live-card__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 50%, #2a2438), color-mix(in srgb, var(--c-accent) 20%, #15131c))
    center / cover no-repeat;
  flex-shrink: 0;
  border: 3px solid rgba(255,71,87,0.6);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(255,71,87,0.3);
}
.live-card__avatar[data-has-image="true"] {
  background-color: var(--c-bg-3);
  background-image: var(--bgi);
}
.live-card__avatar::after {
  content: attr(data-letter);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
}
.live-card__avatar[data-has-image="true"]::after { display: none; }
.live-card__id { flex: 1; min-width: 0; }
.live-card__name {
  font-size: 15px; font-weight: 700;
  color: var(--c-fg-1);
  /* Allow up to two lines — same reasoning as .member-card__name above.
     Live cards are narrower so the wrap kicks in sooner. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  letter-spacing: -.005em;
  margin-bottom: 2px;
}
.live-card__game {
  font-size: 12px; color: var(--c-fg-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-card__title {
  font-size: 13px; color: var(--c-fg-2);
  padding: 4px 16px 16px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-height: 1.45;
}
/* Iframe occupies the entire thumbnail slot and plays from page-
   load. The thumbnail background still loads (cheap JPEG) and shows
   underneath until the Kick player paints — gives a graceful poster
   frame for any moment the player is buffering. The bottom pills
   stay on top of the player at a slightly lower opacity so they're
   visible without fighting the stream UI. */
.live-card__embed {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  z-index: 3;
  background: var(--c-bg-2);
}
.live-card__thumb { position: relative; }
/* Hide the gradient-bottom mask once the iframe paints — the player
   has its own controls UI we shouldn't darken. */
.live-card__thumb::after { opacity: 0.4; }
.live-card__live-pill,
.live-card__viewers-pill,
.live-card__uptime-pill {
  z-index: 4;       /* sit above the iframe */
}

/* Click-catcher above the muted preview iframe. The Kick player iframe
   captures clicks on its area, so without this layer a click on the
   card body never bubbles to our "open watch modal" handler — the
   visitor would only be able to open the modal by clicking the slim
   borders around the player. Transparent until hover, where it fades
   in a subtle "Watch + Chat" CTA so it's discoverable.

   Pills (live/viewers/uptime) sit at z-index 4 underneath this so they
   stay readable; the CTA's hover overlay is a translucent gradient
   that doesn't fully wash them out. */
.live-card__open-watch {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background .18s ease;
}
.live-card__open-watch:hover,
.live-card__open-watch:focus-visible {
  background: linear-gradient(180deg, rgba(0,0,0,0.30), rgba(0,0,0,0.55));
  outline: none;
}
.live-card__open-watch-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(255,71,87,0.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.live-card__open-watch:hover .live-card__open-watch-cta,
.live-card__open-watch:focus-visible .live-card__open-watch-cta {
  opacity: 1;
  transform: translateY(0);
}
.live-card__open-watch-cta i { font-size: 12px; }

/* Per-card mute toggle. Sits above the click-catcher so it stays
   interactive; the JS handler stops propagation so clicking it
   doesn't also open the watch modal. Bottom-right corner so it
   doesn't fight the LIVE / viewers / uptime pills. */
.live-card__mute {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 6;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-size: 13px;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.live-card__mute:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.06);
}
.live-card__mute.is-unmuted {
  background: rgba(83, 252, 24, 0.85);
  color: #062a0a;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(83, 252, 24, 0.5);
}
.live-card__mute.is-unmuted:hover {
  background: rgba(83, 252, 24, 1);
}
.live-card__mute:focus-visible {
  outline: 2px solid rgba(83, 252, 24, 0.7);
  outline-offset: 2px;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  50%      { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* ─── Watch modal — big stream + chat overlay ─── */
.watch-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.watch-modal.is-open { display: flex; }
.watch-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.watch-modal__shell {
  position: relative;
  z-index: 1;
  width: min(1400px, 100%);
  height: min(86vh, 900px);
  background: var(--c-bg-2, #0f0f12);
  border: 1px solid var(--c-border-strong, rgba(255,255,255,0.12));
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.watch-modal__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border, rgba(255,255,255,0.08));
  background: rgba(20, 22, 30, 0.95);
}
.watch-modal__id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-fg-1, #f1f5f9);
  font-size: 15px;
}
.watch-modal__id strong { font-weight: 700; letter-spacing: -.005em; }
.watch-modal__live-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c-danger, #ef4444);
  box-shadow: 0 0 10px rgba(239,68,68,0.7);
  animation: live-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.watch-modal__kick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-fg-2, #cbd5e1);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border, rgba(255,255,255,0.10));
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.watch-modal__kick-link:hover {
  background: rgba(83, 252, 24, 0.10);
  color: #53FC18;
  border-color: rgba(83, 252, 24, 0.4);
}
.watch-modal__close {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--c-border, rgba(255,255,255,0.10));
  color: var(--c-fg-2, #cbd5e1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.watch-modal__close:hover {
  background: rgba(255,71,87,0.12);
  color: var(--c-danger, #ef4444);
  border-color: rgba(255,71,87,0.4);
}
.watch-modal__body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
}
.watch-modal__player,
.watch-modal__chat {
  position: relative;
  min-height: 0;
  background: #000;
}
.watch-modal__chat {
  border-left: 1px solid var(--c-border, rgba(255,255,255,0.08));
  background: #18181b;
}
.watch-modal__player iframe,
.watch-modal__chat iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 900px) {
  .watch-modal { padding: 12px; }
  .watch-modal__shell { height: min(92vh, none); }
  .watch-modal__body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .watch-modal__player { aspect-ratio: 16 / 9; }
  .watch-modal__chat {
    border-left: 0;
    border-top: 1px solid var(--c-border, rgba(255,255,255,0.08));
    min-height: 280px;
  }
}

/* ─── Members grid ─── */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.member-card {
  position: relative;
  background: var(--c-glass-bg);
  backdrop-filter: var(--c-glass-blur);
  -webkit-backdrop-filter: var(--c-glass-blur);
  border: 1px solid var(--c-border-strong);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex; gap: 16px; align-items: center;
  min-height: 96px;
  transition: transform .28s cubic-bezier(.4,0,.2,1), box-shadow .28s ease, border-color .28s ease, background .28s ease;
  box-shadow: var(--c-glass-shadow), var(--c-glass-inset);
  overflow: hidden;
}
/* When the member has a Kick channel banner, swap the flat slate
   glass background for the actual banner. Dark gradient overlay
   keeps text legible. */
.member-card[data-has-banner="true"] {
  background:
    linear-gradient(90deg, rgba(11,13,18,0.95) 0%, rgba(11,13,18,0.78) 45%, rgba(11,13,18,0.55) 100%),
    var(--c-banner) center / cover no-repeat,
    var(--c-glass-bg);
}
.member-card[data-has-banner="true"]:hover {
  background:
    linear-gradient(90deg, rgba(11,13,18,0.92) 0%, rgba(11,13,18,0.72) 45%, rgba(11,13,18,0.45) 100%),
    var(--c-banner) center / cover no-repeat,
    var(--c-glass-bg-hover);
}
.member-card::before {
  /* Top-stripe accent — invisible by default, blooms on hover.
     Live cards get a permanently-visible red variant below. */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--c-accent), color-mix(in srgb, var(--c-accent) 60%, #fff), var(--c-accent), transparent);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.member-card::after {
  /* Radial bloom from behind the avatar on hover — adds depth. */
  content: '';
  position: absolute;
  left: -20%; top: 50%;
  transform: translateY(-50%);
  width: 60%; aspect-ratio: 1 / 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--c-accent) 35%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  filter: blur(20px);
}
.member-card:hover {
  border-color: color-mix(in srgb, var(--c-accent) 55%, transparent);
  transform: translateY(-6px);
  box-shadow: var(--c-glow-accent), var(--c-glass-inset);
  background: var(--c-glass-bg-hover);
}
.member-card:hover::before { opacity: 1; }
.member-card:hover::after  { opacity: 1; }

.member-card__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  /* Default: gradient + initial letter (visible when no image URL).
     When data-has-image="true" is set on the element, the inline
     style sets background-image and we hide the ::after letter. */
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 55%, #2a2438), color-mix(in srgb, var(--c-accent) 25%, #15131c))
    center / cover no-repeat;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3), 0 0 0 2px rgba(255,255,255,0.06);
}
.member-card__avatar[data-has-image="true"] {
  background-color: var(--c-bg-3);   /* image set inline; clear the gradient */
}
.member-card__avatar[style*="background-image"] {
  background-image: var(--bgi);      /* inline style wins via cascade */
}
/* Initial-letter placeholder — visible when no image URL is set. */
.member-card__avatar::after {
  content: attr(data-letter);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 26px; font-weight: 800;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
}
.member-card__avatar[data-has-image="true"]::after { display: none; }
.member-card.is-live .member-card__avatar {
  box-shadow: 0 0 0 3px var(--c-bg-1), 0 0 0 5px var(--c-danger), 0 6px 20px rgba(239,68,68,0.35);
  animation: c-avatar-live 2.4s ease-in-out infinite;
}
@keyframes c-avatar-live {
  0%, 100% { box-shadow: 0 0 0 3px var(--c-bg-1), 0 0 0 5px var(--c-danger), 0 6px 20px rgba(239,68,68,0.35); }
  50%      { box-shadow: 0 0 0 3px var(--c-bg-1), 0 0 0 5px var(--c-danger), 0 6px 26px rgba(239,68,68,0.55); }
}

.member-card__id { flex: 1; min-width: 0; }
.member-card__name {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 20px; font-weight: 600; letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--c-fg-1);
  /* Wrap long display names to a second line instead of truncating
     with an ellipsis. Capped at 2 lines via line-clamp so the card
     height stays predictable when someone has a very long handle.
     `overflow-wrap: anywhere` lets names without spaces break too. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.15;
  margin-bottom: 2px;
}
.member-card__rank {
  display: inline-block;
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 5px;
  margin-top: 4px;
  color: #fff;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.18);
}
.member-card__state {
  font-size: 11px; margin-top: 6px;
  color: var(--c-fg-4);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.member-card.is-live {
  border-color: rgba(255,71,87,0.42);
  box-shadow: 0 4px 24px rgba(255,71,87,0.14), var(--c-glass-inset);
}
.member-card.is-live::before {
  /* Always-visible red stripe for live cards. */
  opacity: 1;
  background: linear-gradient(90deg, transparent, var(--c-danger), #ff8a95, var(--c-danger), transparent);
}
.member-card.is-live:hover {
  border-color: rgba(255,71,87,0.6);
  box-shadow: var(--c-glow-live), var(--c-glass-inset);
}
.member-card.is-live .member-card__state {
  color: #fee2e2; font-weight: 600;
}
.member-card.is-live .member-card__state .live-dot,
.member-card.is-live .member-card__state i.fa-circle {
  color: var(--c-danger);
  font-size: 8px;
  animation: c-live-pulse 1.6s ease-in-out infinite;
}
.member-card.is-banned {
  opacity: 0.55;
  border-color: rgba(239,68,68,0.30);
  background: linear-gradient(180deg, rgba(239,68,68,0.05), transparent);
}
.member-card.is-banned:hover { transform: none; box-shadow: none; }
.member-card.is-banned::after {
  content: 'BANNED';
  position: absolute; top: 8px; right: 10px;
  font-size: 9px; font-weight: 800;
  color: var(--c-danger);
  letter-spacing: 0.08em;
  background: rgba(239,68,68,0.14);
  padding: 3px 7px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(239,68,68,0.3) inset;
}

/* Social icons under member name — small pill links to youtube/tiktok/etc */
.member-card__social {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  color: var(--c-fg-3);
  font-size: 11px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, transform .15s ease, border-color .15s ease;
}
.member-card__social:hover {
  background: color-mix(in srgb, var(--c-accent) 18%, transparent);
  color: #fff;
  border-color: color-mix(in srgb, var(--c-accent) 45%, transparent);
  transform: translateY(-1px);
}

/* ─── Markdown content block (about/rules/recruitment) ─── */
.md-content {
  font-size: 15px;
  color: var(--c-fg-2);
  line-height: 1.75;
  letter-spacing: -.005em;
  position: relative;
}
/* The first visible line of the about/rules block gets larger, brighter
   type — an editorial "lead" treatment so long blocks have a clear
   visual entry point. CSS-only via ::first-line, no markup change. */
.md-content::first-line {
  font-size: 17px;
  font-weight: 500;
  color: var(--c-fg-1);
}
.md-content h1, .md-content h2, .md-content h3 { color: var(--c-fg-1); }
.md-content h1 { font-size: 22px; margin: 24px 0 12px; }
.md-content h2 { font-size: 18px; margin: 22px 0 10px; }
.md-content h3 { font-size: 16px; margin: 18px 0 8px; }
.md-content p  { margin: 0 0 12px; }
.md-content ul, .md-content ol { margin: 0 0 12px; padding-left: 22px; }
.md-content code { background: var(--c-bg-2); padding: 2px 5px; border-radius: 4px; font-size: 0.9em; }
.md-content a { color: var(--c-accent); }

/* ─── Sponsors strip ─── */
.sponsors-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.sponsor-card {
  position: relative;
  background: var(--c-glass-bg);
  backdrop-filter: var(--c-glass-blur);
  -webkit-backdrop-filter: var(--c-glass-blur);
  border: 1px solid var(--c-border-strong);
  border-radius: 14px;
  padding: 18px 20px;
  min-height: 72px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none;
  color: var(--c-fg-2);
  transition: transform .25s cubic-bezier(.4,0,.2,1), border-color .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: var(--c-glass-shadow), var(--c-glass-inset);
}
.sponsor-card:hover {
  border-color: color-mix(in srgb, var(--c-accent) 50%, transparent);
  color: var(--c-fg-1);
  transform: translateY(-3px);
  box-shadow: var(--c-glow-accent), var(--c-glass-inset);
  background: var(--c-glass-bg-hover);
}
.sponsor-card img { max-height: 40px; max-width: 140px; object-fit: contain; }

/* ─── Apply form ─── */
.apply-form {
  max-width: 660px;
  background: var(--c-bg-1);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 28px;
}
.apply-form__field { margin-bottom: 18px; }
.apply-form__label {
  display: block;
  font-size: 13px; font-weight: 600;
  margin-bottom: 6px;
  color: var(--c-fg-1);
}
.apply-form__label .req { color: var(--c-danger); margin-left: 3px; }
.apply-form__help { font-size: 12px; color: var(--c-fg-3); margin-top: 4px; }
.apply-form__input, .apply-form__textarea, .apply-form__select {
  width: 100%;
  padding: 10px 12px;
  background: var(--c-bg-0);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  color: var(--c-fg-1);
  font-size: 14px;
  font-family: inherit;
}
.apply-form__textarea { min-height: 100px; resize: vertical; }
.apply-form__input:focus, .apply-form__textarea:focus, .apply-form__select:focus {
  outline: none; border-color: var(--c-accent);
}
.apply-form__option { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.apply-form__option input { margin: 0; }
.apply-form__error,
.apply-form__success {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.apply-form__error   { background: rgba(239,68,68,0.10); color: #fca5a5; border: 1px solid rgba(239,68,68,0.30); }
.apply-form__success { background: rgba(16,185,129,0.10); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.30); }

/* ─── Dashboard ─── */
.community-dashboard {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  max-width: 1180px; margin: 0 auto;
  padding: 24px;
}
.community-dashboard__nav {
  background: var(--c-bg-1);
  border: 1px solid var(--c-border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 10px;
}
.community-dashboard__nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--c-fg-3);
  text-decoration: none;
  margin-bottom: 2px;
  position: relative;
}
.community-dashboard__nav a:hover { background: var(--c-bg-3); color: var(--c-fg-1); }
.community-dashboard__nav a.is-active {
  background: var(--c-bg-3);
  color: var(--c-accent);
  box-shadow: inset 3px 0 0 var(--c-accent);
}
.community-dashboard__nav a .badge {
  margin-left: auto;
  background: var(--c-danger); color: #fff;
  font-size: 11px; padding: 0 6px;
  border-radius: 9px;
  min-width: 18px; height: 18px;
  display: grid; place-items: center;
}
.community-dashboard__main {
  background: var(--c-bg-1);
  border: 1px solid var(--c-border);
  border-radius: 0 12px 12px 12px;
  padding: 24px;
}

/* Stat tiles on dashboard overview */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-tile {
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 16px 18px;
}
.stat-tile__num { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--c-fg-1); }
.stat-tile__lbl { font-size: 12px; color: var(--c-fg-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Tables (members, applications, audit) */
.community-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.community-table th, .community-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
}
.community-table th {
  font-weight: 700; color: var(--c-fg-2);
  background: var(--c-bg-2);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
}
.community-table tr:hover td { background: rgba(255,255,255,0.02); }
.community-table .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── Member profile (/m/:username) — public per-member page ─── */
.member-profile {
  position: relative;
  background: var(--c-glass-bg);
  backdrop-filter: var(--c-glass-blur);
  -webkit-backdrop-filter: var(--c-glass-blur);
  border: 1px solid var(--c-border-strong);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--c-glass-shadow), var(--c-glass-inset);
  overflow: hidden;
}
/* Banner background on profile page — bigger, more dramatic
   gradient than the directory card so the page reads as a
   "channel-style" landing page for that member. */
.member-profile[data-has-banner="true"] {
  background:
    linear-gradient(180deg, rgba(11,13,18,0.55) 0%, rgba(11,13,18,0.78) 60%, rgba(11,13,18,0.92) 100%),
    var(--c-banner) center / cover no-repeat,
    var(--c-glass-bg);
}
.member-profile::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--c-accent), color-mix(in srgb, var(--c-accent) 60%, #fff), var(--c-accent), transparent);
  opacity: 0.85;
}
.member-profile__head {
  display: flex; gap: 32px; align-items: center;
  flex-wrap: wrap;
}
.member-profile__avatar {
  width: 160px; height: 160px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 55%, #2a2438), color-mix(in srgb, var(--c-accent) 25%, #15131c))
    center / cover no-repeat;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0,0,0,0.4), 0 0 0 2px rgba(255,255,255,0.06);
}
.member-profile__avatar[data-has-image="true"] { background-color: var(--c-bg-3); }
.member-profile__avatar.is-live {
  box-shadow: 0 0 0 4px var(--c-bg-1), 0 0 0 7px var(--c-danger), 0 12px 36px rgba(255,71,87,0.35);
  animation: c-avatar-live-big 2.4s ease-in-out infinite;
}
@keyframes c-avatar-live-big {
  0%, 100% { box-shadow: 0 0 0 4px var(--c-bg-1), 0 0 0 7px var(--c-danger), 0 12px 36px rgba(255,71,87,0.35); }
  50%      { box-shadow: 0 0 0 4px var(--c-bg-1), 0 0 0 7px var(--c-danger), 0 12px 44px rgba(255,71,87,0.55); }
}
.member-profile__avatar::after {
  content: attr(data-letter);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 60px; font-weight: 800;
  color: rgba(255,255,255,0.85);
  pointer-events: none;
}
.member-profile__avatar[data-has-image="true"]::after { display: none; }
.member-profile__live-pill {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--c-danger);
  color: #fff;
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(255,71,87,0.45);
  z-index: 2;
}
.member-profile__live-pill .live-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: c-live-pulse 1.6s ease-in-out infinite;
}

.member-profile__id {
  flex: 1; min-width: 280px;
}
.member-profile__name {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 44px; font-weight: 700; letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--c-fg-1);
  background: linear-gradient(135deg, #ffffff 30%, color-mix(in srgb, var(--c-accent) 75%, #ffffff));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.05;
}
.member-profile__sub {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--c-fg-3);
  margin-bottom: 16px;
}
.member-profile__handle { color: var(--c-fg-4); }
.member-profile__live-meta {
  color: var(--c-fg-1); font-weight: 600;
  display: inline-flex; gap: 6px; align-items: center;
}
.member-profile__live-meta i { color: var(--c-danger); }
.member-profile__bio {
  margin: 0 0 18px;
  font-size: 15px; line-height: 1.65;
  color: var(--c-fg-2);
  max-width: 720px;
  white-space: pre-wrap;
}
.member-profile__socials {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.member-profile__social {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  color: var(--c-fg-1);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
}
.member-profile__social i {
  color: var(--social-tint, var(--c-accent));
  font-size: 16px;
}
.member-profile__social:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--social-tint, var(--c-accent));
  transform: translateY(-2px);
  color: #fff;
}
.member-profile__actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}

.member-profile__embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--c-border-strong);
  box-shadow: var(--c-glass-shadow);
}
.member-profile__embed {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

@media (max-width: 720px) {
  .member-profile { padding: 22px; }
  .member-profile__head { gap: 20px; }
  .member-profile__avatar { width: 120px; height: 120px; }
  .member-profile__avatar::after { font-size: 44px; }
  .member-profile__name { font-size: 32px; }
}

/* Footer — structured: brand · socials · nav · recruitment · bottom row */
.community-footer {
  margin-top: 60px;
  border-top: 1px solid var(--c-border);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
  padding: 48px 24px 28px;
  color: var(--c-fg-3);
}
.community-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--c-border);
}
.community-footer__brand {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.community-footer__logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--c-border);
}
.community-footer__name {
  font-family: 'Oswald', 'Inter', sans-serif;
  font-size: 22px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c-fg-1);
  line-height: 1.1;
}
.community-footer__tagline {
  font-size: 13px; color: var(--c-fg-3);
  margin-top: 2px;
}
.community-footer__socials {
  display: flex; gap: 8px;
}
.community-footer__social {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-fg-2);
  font-size: 14px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, color .15s ease;
}
.community-footer__social:hover {
  background: color-mix(in srgb, var(--c-accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--c-accent) 45%, transparent);
  color: #fff;
  transform: translateY(-2px);
}
.community-footer__nav {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.community-footer__nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--c-fg-2);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.community-footer__nav a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.community-footer__recruitment {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 18px 22px;
  font-size: 13px; line-height: 1.65;
  color: var(--c-fg-3);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--c-border);
  border-radius: 12px;
}

.community-footer__bottom {
  max-width: 1240px;
  margin: 24px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  font-size: 12px;
  color: var(--c-fg-4);
  letter-spacing: 0.02em;
}
.community-footer__powered a {
  color: color-mix(in srgb, var(--c-accent) 75%, #fff);
  text-decoration: none; font-weight: 700;
}
.community-footer__powered a:hover { color: #fff; }

@media (max-width: 720px) {
  .community-footer__inner {
    grid-template-columns: 1fr;
    gap: 22px;
    text-align: left;
  }
  .community-footer__bottom { justify-content: center; text-align: center; }
}

/* Empty states */
.community-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-fg-4);
  border: 1px dashed var(--c-border);
  border-radius: 12px;
}

/* Banner ribbon (e.g. pending application) */
.community-banner {
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.30);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--c-fg-1);
  margin-bottom: 20px;
}
.community-banner--success { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.30); }
.community-banner--error   { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.30); }
.community-banner--warning { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.30); }

/* Flash toasts (for ?ok / ?error query strings) */
.community-flash { margin-bottom: 16px; }

/* ── Live-update toast ────────────────────────────────────────────
   Floating action button shown when refreshLive() detects a member
   went live who isn't on the page yet. Click reloads. Renders bottom-
   right so it doesn't overlap any active iframe in the live strip. */
.community-live-toast {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--c-danger);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 14px; font-weight: 700;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.4);
  display: flex; align-items: center; gap: 10px;
  animation: c-toast-slide-in 0.4s cubic-bezier(.4,0,.2,1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.community-live-toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.5);
}
.community-live-toast .live-dot {
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: c-live-pulse 1.6s ease-in-out infinite;
}
@keyframes c-toast-slide-in {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@media (max-width: 640px) {
  .community-live-toast {
    left: 12px; right: 12px; bottom: 12px;
    justify-content: center;
  }
}

/* ─── Community chat panel ─── */
/* Glassy column to the right of the live grid. Sticky so it follows
   the visitor as they scroll the grid; on mobile it relaxes into a
   normal block (see .live-with-chat media query). */
.chat-panel {
  position: sticky;
  top: 18px;
  background: var(--c-glass-bg, rgba(15,17,24,0.55));
  backdrop-filter: var(--c-glass-blur, blur(12px));
  -webkit-backdrop-filter: var(--c-glass-blur, blur(12px));
  border: 1px solid var(--c-border-strong, rgba(255,255,255,0.12));
  border-radius: 16px;
  box-shadow: var(--c-glass-shadow, 0 10px 30px rgba(0,0,0,0.35));
  display: flex;
  flex-direction: column;
  height: min(72vh, 720px);
  min-height: 420px;
  overflow: hidden;
}
.chat-panel__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-border, rgba(255,255,255,0.08));
}
.chat-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-fg-1, #f1f5f9);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.chat-panel__title i { color: var(--c-accent, #ef4444); }
.chat-panel__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--c-fg-3, #94a3b8);
  font-weight: 600;
}
.chat-panel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-fg-3, #94a3b8);
  box-shadow: 0 0 0 2px rgba(148,163,184,0.15);
}
.chat-panel__status[data-state="ok"]   .chat-panel__dot { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.18); }
.chat-panel__status[data-state="warn"] .chat-panel__dot { background: #fbbf24; box-shadow: 0 0 0 2px rgba(251,191,36,0.18); }
.chat-panel__status[data-state="err"]  .chat-panel__dot { background: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.18); }

/* Channel chip strip — the chip row is bordered by two arrow buttons
   that only appear when the strip actually overflows. Avoids the "where
   does the list end?" disorientation when a community has 10+ live
   members at once. */
.chat-panel__chiprow {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--c-border, rgba(255,255,255,0.08));
}
.chat-panel__nav {
  flex: 0 0 auto;
  width: 26px;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.25);
  color: var(--c-fg-2, #cbd5e1);
  border: 0;
  cursor: pointer;
  font-size: 12px;
  transition: background .15s ease, color .15s ease;
}
.chat-panel__nav:hover { background: rgba(255,71,87,0.18); color: #fff; }
.chat-panel__nav:focus-visible { outline: 2px solid rgba(255,71,87,0.55); outline-offset: -2px; }
.chat-panel__nav[hidden] { display: none; }
.chat-panel__nav--prev { border-right: 1px solid var(--c-border, rgba(255,255,255,0.08)); }
.chat-panel__nav--next { border-left:  1px solid var(--c-border, rgba(255,255,255,0.08)); }

.chat-panel__chips {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;            /* Firefox — arrows replace the bar */
  -webkit-overflow-scrolling: touch;
  /* Soft edge fades so chips appear to slide under the arrow buttons
     instead of being abruptly clipped — drawn with a mask so they
     compose correctly over the glass panel background. */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.chat-panel__chips::-webkit-scrollbar { display: none; }

.chat-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 12px 5px 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border, rgba(255,255,255,0.10));
  border-radius: 999px;
  color: var(--c-fg-2, #cbd5e1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.chat-chip:hover { background: rgba(255,255,255,0.08); }
.chat-chip:focus-visible { outline: 2px solid rgba(255,71,87,0.45); outline-offset: 1px; }
.chat-chip.active {
  background: rgba(255,71,87,0.18);
  color: #fff;
  border-color: rgba(255,71,87,0.55);
  transform: scale(1.02);
}
.chat-chip__avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06) center / cover no-repeat;
  position: relative;
  flex-shrink: 0;
}
.chat-chip__avatar::after {
  content: attr(data-letter);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  color: rgba(255,255,255,0.85);
}
.chat-chip__avatar[style*="background-image"]::after { display: none; }
.chat-chip__name {
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Small pulsing red dot in the corner of every chip — reinforces that
   the channel is live right now, since the strip no longer includes a
   non-channel "All" tab to anchor that meaning. */
.chat-chip__livedot {
  position: absolute;
  top: 3px; right: 6px;
  width: 6px; height: 6px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(15,17,24,0.9);
  animation: c-live-pulse 1.6s ease-in-out infinite;
}

/* Messages feed */
.chat-panel__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 4px 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.4) transparent;
}
.chat-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  color: var(--c-fg-3, #94a3b8);
  font-size: 12px;
  text-align: center;
}
.chat-panel__empty i { font-size: 22px; opacity: 0.5; }
.chat-msg {
  border-left: 3px solid #53fc18;
  padding: 4px 8px 4px 8px;
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.42;
  color: var(--c-fg-1, #e2e8f0);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.chat-msg__channel {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: 1px;
  letter-spacing: .02em;
}
.chat-msg__sender {
  font-weight: 700;
  color: #fbbf24;
  margin-right: 4px;
}
.chat-msg__sender::after { content: ':'; opacity: 0.6; margin-left: 1px; }
.chat-msg__body { color: var(--c-fg-1, #e2e8f0); }
.chat-msg__body a { color: #93c5fd; text-decoration: underline; }
.chat-msg__emote {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(83,252,24,0.10);
  border: 1px solid rgba(83,252,24,0.25);
  border-radius: 4px;
  font-size: 11px;
  color: #bbf7d0;
  font-family: 'Outfit', system-ui, sans-serif;
}

/* Input footer */
.chat-panel__form {
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--c-border, rgba(255,255,255,0.08));
  background: rgba(0,0,0,0.18);
}
.chat-panel__target {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--c-fg-3, #94a3b8);
  margin-bottom: 6px;
}
.chat-panel__target i { font-size: 10px; opacity: 0.7; }
.chat-panel__target strong { color: var(--c-fg-1, #e2e8f0); font-weight: 700; }
.chat-panel__inputrow {
  display: flex;
  gap: 6px;
}
.chat-panel__inputrow input {
  flex: 1;
  background: rgba(15,23,42,0.7);
  color: #e2e8f0;
  border: 1px solid var(--c-border, rgba(255,255,255,0.12));
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}
.chat-panel__inputrow input:focus { outline: none; border-color: rgba(83,252,24,0.45); }
.chat-panel__inputrow input:disabled { opacity: 0.55; cursor: not-allowed; }
.chat-panel__inputrow button {
  background: linear-gradient(135deg, rgba(83,252,24,0.25), rgba(83,252,24,0.08));
  color: #bbf7d0;
  border: 1px solid rgba(83,252,24,0.4);
  border-radius: 10px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 14px;
  transition: filter .15s ease;
}
.chat-panel__inputrow button:hover:not(:disabled) { filter: brightness(1.15); }
.chat-panel__inputrow button:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-panel__hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--c-fg-3, #94a3b8);
  min-height: 14px;
}
.chat-panel__hint.warn { color: #fbbf24; }
.chat-panel__hint.err  { color: #fca5a5; }
.chat-panel__hint a    { color: inherit; text-decoration: underline; font-weight: 700; }
