/* Comunidade: activity pulse, composer, feed tabs, post cards with inline threads and the side rail. */
.community-layout {
  --like: #f0769d;
  --hot: #ffb35c;
  --glass: #ffffff08;
  --line: #ffffff12;
}
:root[data-theme='light'] .community-layout,
:root[data-theme='light'] .thread-modal {
  --like: #d63c6f;
  --hot: #c46a06;
  --glass: #7741dc08;
  --line: #7741dc1a;
}
.community-layout .sr-only,
.thread-modal .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.community-main { display: flex; flex-direction: column; min-width: 0; }

/* Hero pulse: a compact reading of what the feed holds right now. */
.community-pulse { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; list-style: none; padding: 0; }
.community-pulse li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid #ffffff22;
  border-radius: 999px;
  background: #140b2466;
  backdrop-filter: blur(8px);
  color: #d9cbef;
  font-size: 12px;
}
.community-pulse li b { color: #fff; font-family: var(--font-pixel, 'Outfit', sans-serif); font-size: 15px; font-weight: 650; }
.community-pulse .icon { width: 15px; height: 15px; color: #c4a4ff; }
.community-pulse li.is-live .icon { color: var(--green); }

/* Composer. */
.community-composer { gap: 14px; padding: 18px; margin-bottom: 26px; }
.community-composer > .avatar { width: 42px; height: 42px; }
.community-composer textarea {
  display: block;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  transition: border-color .2s, background .2s;
}
.community-composer textarea:focus-visible { outline: none !important; }
.community-composer textarea:focus { background: var(--surface); border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.composer-prompts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.composer-prompt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  transition: color .2s, border-color .2s, background .2s;
}
.composer-prompt .icon { width: 14px; height: 14px; color: var(--accent); }
.composer-prompt:hover { color: var(--text); border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.community-composer .composer-bottom { display: flex; align-items: center; gap: 12px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); }
.composer-game { position: relative; display: inline-flex; align-items: center; min-width: 0; max-width: 220px; }
.composer-game > .icon { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--accent); pointer-events: none; }
.composer-game select { width: 100%; padding: 7px 12px 7px 32px; border-radius: 999px; font-size: 12px; background-color: var(--surface-2); }
.composer-hint { margin-left: auto; color: var(--faint); font-size: 11px; }
.composer-count { min-width: 56px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.composer-count.is-near { color: var(--hot); font-weight: 650; }
.community-composer .auth-message { margin-top: 10px; }
.guest-composer { padding: 20px; margin-bottom: 26px; border-style: dashed; }

/* Feed toolbar. */
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.feed-toolbar h2 { font-size: 19px; letter-spacing: -.3px; }
.feed-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.feed-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 550; transition: color .2s, background .2s; }
.feed-tab .icon { width: 15px; height: 15px; }
.feed-tab:hover { color: var(--text); }
.feed-tab.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.feed-tab.active .icon { color: var(--accent); }

/* Post card. */
.community-post { padding: 20px 22px 14px; margin-bottom: 16px; }
.community-post:hover { transform: none; }
.community-post.is-open { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.community-post .post-header { align-items: flex-start; gap: 12px; margin-bottom: 13px; }
.community-post .post-header > .player-avatar-link .avatar { width: 42px; height: 42px; }
.post-author { flex: 1; min-width: 0; }
.post-author-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.post-author-line strong { font-size: 14px; }
.community-post .post-header small { margin-top: 2px; font-size: 12px; }
.post-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.post-chip .icon { width: 11px; height: 11px; }
.post-chip.is-hot { background: color-mix(in srgb, var(--hot) 16%, transparent); color: var(--hot); }
.post-report { width: 32px; height: 32px; margin: -4px -6px 0 0; color: var(--faint); opacity: .7; transition: opacity .2s, color .2s, background .2s; }
.post-report .icon { width: 16px; height: 16px; }
.community-post:hover .post-report, .post-report:focus-visible { opacity: 1; }
.post-report:hover { color: var(--text); background: var(--surface-2); }
.post-body p { font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-body.is-clamped p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.post-more { margin-top: 6px; color: var(--accent); font-size: 13px; font-weight: 600; }
.post-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.community-post .post-game { margin-top: 14px; transition: border-color .2s, transform .2s; }
.community-post .post-game:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); transform: translateY(-1px); }
.community-post .post-game > div { flex: 1; min-width: 0; }
.community-post .post-game small { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.community-post .post-game > .icon { color: var(--accent); }
.community-post .post-game .game-art { width: 112px; flex: 0 0 112px; }
.post-game-icon { display: grid; place-items: center; width: 64px; aspect-ratio: 16 / 10; border-radius: 7px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }

.community-post .post-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; padding-top: 8px; }
.community-post .post-action {
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  transition: color .2s, background .2s;
}
.community-post .post-action:hover { background: var(--surface-2); color: var(--text); transform: none; }
.community-post .post-action .icon { width: 18px; height: 18px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.community-post .post-action b { font-weight: 650; font-variant-numeric: tabular-nums; }
.community-post .post-action.liked { color: var(--like); }
.community-post .post-action.liked .icon { fill: var(--like); transform: scale(1.12); animation: community-like .4s cubic-bezier(.3, 1.6, .5, 1); }
.community-post .post-action.is-active { background: var(--accent-soft); color: var(--accent); }
@keyframes community-like { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1.12); } }

/* Threads: inline under a post and inside the discussion modal. */
.post-thread { margin: 10px -22px -14px; padding: 16px 22px 18px; border-top: 1px solid var(--border); background: var(--glass); border-radius: 0 0 14px 14px; animation: community-thread-in .25s ease-out; }
@keyframes community-thread-in { from { opacity: 0; transform: translateY(-4px); } }
.thread-list { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.thread-modal .thread-list { max-height: min(52vh, 460px); overflow-y: auto; padding-right: 4px; }
.thread-item { display: flex; align-items: flex-start; gap: 10px; }
.thread-item .avatar { width: 32px; height: 32px; }
.thread-bubble { position: relative; flex: 1; min-width: 0; padding: 9px 13px 10px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); }
.thread-item.is-own .thread-bubble { background: var(--accent-soft); }
.thread-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.thread-meta strong { font-size: 13px; }
.thread-meta a:hover strong { color: var(--accent); }
.thread-meta small { color: var(--faint); font-size: 11px; }
.thread-bubble p { margin-top: 3px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-report { position: absolute; top: 9px; right: 12px; color: var(--faint); font-size: 11px; opacity: 0; transition: opacity .2s, color .2s; }
.thread-item:hover .thread-report, .thread-report:focus-visible { opacity: 1; }
.thread-report:hover { color: var(--text); text-decoration: underline; }
.thread-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.thread-loading { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.thread-loading > span:not(.sr-only) { height: 44px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)) 0 0 / 200% 100%; animation: community-shimmer 1.3s linear infinite; }
.thread-loading > span:nth-child(2) { width: 72%; }
.thread-form { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.thread-form > .avatar { width: 32px; height: 32px; }
.thread-input { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 8px; padding: 5px 5px 5px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.thread-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.thread-input textarea { flex: 1; min-height: 34px; max-height: 160px; padding: 7px 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; line-height: 1.45; resize: none; field-sizing: content; }
/* The wrapper draws the focus ring, so the global :focus-visible outline would double it. */
.thread-input textarea:focus-visible { outline: none !important; }
.thread-input .button { flex-shrink: 0; }
.thread-form .auth-message { flex-basis: 100%; margin-left: 42px; }
.thread-guest { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.thread-guest .icon { width: 16px; height: 16px; color: var(--accent); }

/* Loading and empty feed states. */
.post-skeleton { display: flex; flex-direction: column; gap: 12px; padding: 22px; margin-bottom: 16px; }
.post-skeleton > span:not(.sr-only) { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)) 0 0 / 200% 100%; animation: community-shimmer 1.3s linear infinite; }
.post-skeleton > span:first-child { width: 38%; height: 18px; }
.post-skeleton > span:nth-child(2) { width: 92%; }
.post-skeleton > span:nth-child(3) { width: 64%; }
@keyframes community-shimmer { to { background-position: -200% 0; } }
.community-empty { display: grid; justify-items: center; gap: 6px; padding: 38px 24px; text-align: center; border-style: dashed; }
.community-empty > .icon { width: 30px; height: 30px; margin-bottom: 4px; color: var(--accent); }
.community-empty h3 { font-size: 16px; }
.community-empty p { color: var(--muted); font-size: 13px; }

/* Side rail. */
.community-side .side-card { padding: 18px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.side-head h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.side-head h2 .icon { width: 18px; height: 18px; color: var(--accent); }
.side-pill { padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.side-pill.is-live { background: var(--green-soft); color: var(--green); }
.side-pill.is-live::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: community-pulse 2s ease-in-out infinite; }
@keyframes community-pulse { 50% { opacity: .35; } }
.side-copy { margin-bottom: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.side-list { margin-bottom: 14px; }
.community-side .player-row { margin-bottom: 12px; }
.community-side .player-row .avatar { width: 34px; height: 34px; }
.community-side .player-info strong { font-size: 13px; }
.community-side .player-info small { font-size: 11px; color: var(--muted); }
.community-side .friend-row .player-info small.is-online { color: var(--green); }

.topic-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.community-side .topic { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 10px; border-radius: 11px; text-align: left; transition: background .2s; }
.community-side .topic:hover { background: var(--surface-2); }
.community-side .topic > .icon { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; transition: transform .2s, color .2s; }
.community-side .topic:hover > .icon { color: var(--accent); transform: translateX(2px); }
.community-side .topic > .topic-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-family: var(--font-pixel, 'Outfit', sans-serif); font-size: 14px; font-weight: 700; flex-shrink: 0; }
.topic-list li:first-child .topic > .topic-rank { background: linear-gradient(135deg, #8950f7, #c06bff); color: #fff; }
.community-side .topic > .topic-copy { display: flex; width: auto; color: var(--text); font-family: inherit; font-size: inherit; font-weight: inherit; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.topic-copy strong { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text); }
.topic-copy small { color: var(--muted); font-size: 11px; }
.topic-meter { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.topic-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8950f7, #c06bff); }

.voice-list { margin: 0; padding: 0; list-style: none; }
.voice-list .player-info small { display: flex; align-items: center; gap: 4px; }
.voice-list .player-info small .icon { width: 11px; height: 11px; color: var(--like); }
.voice-list .avatar.is-top { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--yellow); }
.voice-crown { color: var(--yellow); }
.voice-crown .icon { width: 18px; height: 18px; }

.community-rules ul { display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; list-style: none; }
.community-rules li { display: flex; align-items: flex-start; gap: 11px; }
.community-rules li > .icon { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.community-rules strong { display: block; font-size: 13px; }
.community-rules small { color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) {
  .composer-hint { display: none; }
  .composer-count { margin-left: auto; }
}
@media (max-width: 680px) {
  .community-pulse { gap: 6px; margin-top: 16px; }
  .community-pulse li { padding: 5px 10px; font-size: 11px; }
  .community-pulse li b { font-size: 13px; }
  .community-composer { padding: 14px; gap: 10px; }
  .community-composer > .avatar { width: 32px; height: 32px; }
  .community-composer .composer-bottom { flex-wrap: wrap; }
  .composer-game { flex: 1 1 100%; max-width: none; }
  .feed-toolbar { flex-direction: column; align-items: stretch; }
  .feed-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .feed-tab { justify-content: center; padding: 8px 6px; }
  .community-post { padding: 16px 16px 10px; }
  .community-post .post-header > .player-avatar-link .avatar { width: 36px; height: 36px; }
  .post-body p { font-size: 14px; }
  .community-post .post-action { gap: 5px; padding: 0 4px; font-size: 12px; }
  .community-post .post-action span { display: none; }
  .post-thread { margin: 8px -16px -10px; padding: 14px 16px 16px; }
  .thread-form > .avatar { display: none; }
  .thread-form .auth-message { margin-left: 0; }
  .thread-report { position: static; display: block; margin-top: 4px; opacity: 1; }
}

/* Visual community: game collections lead into social cards and focused reading. */
.community-page,
.community-composer-modal {
  --like: #f0769d;
  --hot: #ffb35c;
  --glass: color-mix(in srgb, var(--accent) 4%, transparent);
  --line: color-mix(in srgb, var(--accent) 15%, var(--border));
  --community-radius: 16px;
  --community-art-bg: #211237;
  --community-art-text: #fff;
  --community-art-muted: #e4d9ef;
}
:root[data-theme='light'] :is(.community-page, .community-composer-modal) {
  --like: #d63c6f;
  --hot: #a65b08;
}
.community-page { min-width: 0; }
.community-page > * { min-width: 0; }
.community-page [hidden], .community-composer-modal [hidden] { display: none !important; }
.community-page :is(button, .button, .community-breadcrumb a),
.community-composer-modal :is(button, .button, select) { min-height: 44px; }
.community-page :is(button, a, input, select, textarea):focus-visible,
.community-composer-modal :is(button, a, input, select, textarea):focus-visible { outline-offset: 4px; }
.community-page .sr-only,
.community-composer-modal .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The lobby and game spaces share the site's illustrated, readable cover treatment. */
.community-hero,
.community-game-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: var(--community-radius);
  background: var(--community-art-bg);
  color: var(--community-art-text);
  box-shadow: var(--shadow);
}
.community-hero::after,
.community-game-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #180b32f2, #180b32c2 36%, #180b3229 76%);
}
.community-hero-art,
.community-banner-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 65% center;
  pointer-events: none;
}
:is(.community-hero-art, .community-banner-art) :is(.game-art, img) {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
.community-hero-copy { position: relative; max-width: 520px; padding: 28px 32px; }
.community-page .community-hero-copy .eyebrow,
.community-page .community-banner-copy .eyebrow { margin-bottom: 10px; color: #dcc7ff; }
:root body .community-hero-copy h1 {
  color: var(--community-art-text);
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.03;
  letter-spacing: -.8px;
  text-wrap: balance;
  max-width: 430px;
}
.community-hero-copy p {
  max-width: 330px;
  margin-top: 12px;
  color: var(--community-art-muted);
  font-size: 14px;
  line-height: 1.65;
}
.community-hero-copy .button { margin-top: 18px; }
.community-game-banner {
  justify-content: space-between;
  align-items: flex-end;
  min-height: 225px;
  padding: 28px 30px;
}
.community-game-banner::after {
  background: linear-gradient(90deg, #130a25e8, #130a2540), linear-gradient(0deg, #100a21c9, #100a210d 90%);
}
.community-banner-copy { min-width: 0; max-width: 650px; }
:root body .community-banner-copy h1 {
  color: var(--community-art-text);
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.community-banner-copy p { margin-top: 10px; color: var(--community-art-muted); font-size: 14px; line-height: 1.6; }
.community-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex-shrink: 0; max-width: 100%; }
.community-banner-actions .button.outline { background: #180d2a99; border-color: #ffffff63; color: #fff; }
.community-banner-actions [aria-pressed='true'] { background: var(--surface); border-color: var(--border); color: var(--text); }
.community-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: -8px 0 12px; color: var(--muted); font-size: 13px; }
.community-breadcrumb :is(a, button) { display: inline-flex; align-items: center; color: var(--accent); padding: 7px 2px; }
.community-breadcrumb > .icon { width: 13px; height: 13px; }

.community-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 16px;
}
.community-section-heading > div { min-width: 0; }
:root body .community-section-heading h2 { display: flex; align-items: center; gap: 9px; font-size: clamp(24px, 1.7vw, 30px); line-height: 1.2; }
.community-section-heading h2 > .icon { width: 21px; height: 21px; color: var(--accent); }
.community-section-heading p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.community-composer-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; }

/* Real game covers are the primary entry points, including on small screens. */
.community-game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.community-game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--community-radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.community-game-card:focus-within { border-color: var(--accent); }
.community-game-cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.community-game-cover :is(.game-art, img) { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
.community-game-cover > .game-art,
.community-game-cover > img { transition: transform .3s ease, filter .3s ease; }
.community-game-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 15px; }
:root body .community-game-copy h3 { color: var(--text); font-size: 21px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.community-game-copy > p { margin: 7px 0 15px; color: var(--muted); font-family: var(--font-reading, 'DM Sans', sans-serif); font-size: 12px; line-height: 1.5; }
.community-game-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.community-face-stack { display: inline-flex; align-items: center; padding-left: 6px; }
.community-face-stack :is(.avatar, img) { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.community-face-stack > :is(.avatar, img) { margin-left: -6px; border: 2px solid var(--surface); box-shadow: none; }
.community-face-stack .avatar > img { width: 100%; height: 100%; }
.community-enter { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--accent); font-family: var(--font-pixel, 'Outfit', sans-serif); font-size: 16px; line-height: 1.4; }
.community-enter > .icon { width: 15px; height: 15px; }
.community-catalog-empty { grid-column: 1 / -1; padding: 26px; border: 1px dashed var(--border); border-radius: var(--community-radius); background: var(--surface); color: var(--muted); line-height: 1.65; }
.community-catalog-empty :is(h2, h3, strong) { display: block; color: var(--text); margin-bottom: 8px; }
.community-catalog-empty .button { margin-top: 14px; }

/* Filters support the visual collection; they never replace the game cards. */
.community-feed-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 20px 0 18px; }
.community-feed-toolbar > * { min-width: 0; }
.community-feed-toolbar :is(input[type='search'], select) { min-height: 44px; font-size: 14px; background: var(--surface); }
.community-feed-toolbar input[type='search'] { width: min(100%, 340px); }
.community-feed-toolbar .feed-tabs { flex-shrink: 0; }
.community-page .feed-tab { min-height: 44px; padding: 8px 12px; }
.community-topic-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.community-topic-filter,
.community-following {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}
.community-topic-filter > .icon, .community-following > .icon { width: 16px; height: 16px; }
:is(.community-topic-filter, .community-following):is([aria-pressed='true'], .active) { border-color: color-mix(in srgb, var(--accent) 65%, var(--border)); background: var(--accent-soft); color: var(--accent); }
.community-feed-status { margin: 10px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.community-feed-status[role='alert'] { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.community-feed-status .button { margin-left: 10px; }

/* Social cards mix media, invitations and text without changing reading order. */
.community-feed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.community-feed-grid > :is(.community-empty, .empty-state, .community-feed-status) { grid-column: 1 / -1; }
.community-page .community-post { min-width: 0; margin: 0; padding: 0; overflow: hidden; border-radius: var(--community-radius); background: var(--surface); box-shadow: var(--shadow); }
.community-page .community-post:hover { transform: none; }
.community-page .post-media { position: relative; display: block; width: 100%; min-height: 0; padding: 0; overflow: hidden; background: var(--surface-2); border: 0; border-radius: 0; }
.community-page .post-media .game-art { display: block; width: 100%; aspect-ratio: 16 / 9; transition: transform .3s ease; }
.community-page .post-media :is(img, .game-art-image) { width: 100%; height: 100%; object-fit: cover; }
.community-page .post-media:focus-visible { outline-offset: -4px; }
.community-page .post-media-label { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #ffffff42; border-radius: 7px; background: #180d2acc; color: #fff; font-size: 12px; }
.community-page .post-media-label > .icon { width: 15px; height: 15px; }
.community-page .post-content { min-width: 0; padding: 20px 20px 12px; }
.community-page .community-post .post-header { gap: 10px; margin-bottom: 14px; }
.community-page .community-post .post-header > .player-avatar-link .avatar { width: 36px; height: 36px; }
.community-page .post-author-line strong { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.community-page .community-post .post-header small { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.community-page .post-report { width: 44px; height: 44px; margin: -6px -8px 0 0; opacity: 1; }
.community-page :is(.post-tags, .community-post-tags) { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.community-page .post-chip { font-size: 12px; letter-spacing: .1px; }
.community-page .post-chip .icon { width: 14px; height: 14px; }
.community-page :is(.post-kind, .post-topic) { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.community-page :is(.post-kind, .post-topic) > .icon { width: 14px; height: 14px; }
.community-page .post-tags :is(a, button) { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
:root body .community-page :is(.post-title, .post-title a, .post-title button) { font-family: var(--font-reading, 'DM Sans', sans-serif); font-size: 18px; font-weight: 650; line-height: 1.4; color: var(--text); text-align: left; overflow-wrap: anywhere; }
.community-page .post-body p { max-width: none; font-size: 15px; line-height: 1.75; }
.community-page .post-body.is-clamped p { -webkit-line-clamp: 5; }
.community-page .post-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0; font-size: 14px; }
.community-page .community-post .post-game { margin-top: 14px; padding: 10px; gap: 12px; background: var(--surface-2); }
.community-page .community-post .post-game .game-art { width: 76px; flex-basis: 76px; }
.community-page .community-post .post-game h3 { font-size: 17px; overflow-wrap: anywhere; }
.community-page .community-post .post-game p { font-size: 12px; }
.community-page .community-post .post-actions { margin-top: 16px; padding-top: 8px; gap: 4px; }
.community-page .community-post .post-action { min-height: 44px; gap: 6px; padding: 5px 6px; font-size: 13px; }
.community-page .community-post .post-action span { display: inline; }
.community-page .post-thread { margin: 0; padding: 20px; border-radius: 0; }
.community-page .thread-report { position: static; display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; padding: 5px 0; font-size: 12px; opacity: 1; }
.community-page .thread-meta { gap: 5px 9px; }
.community-page .thread-meta small { font-size: 12px; }
.community-page .thread-bubble p { font-size: 14px; line-height: 1.7; }
.community-page .thread-form { margin-top: 16px; }
.community-page .thread-input textarea { font-size: 16px; min-height: 44px; padding-block: 10px; }
.community-page .thread-input .button { min-height: 44px; }
.community-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; color: var(--muted); font-size: 13px; }
.community-pagination .button { min-width: 112px; }

/* Reading stays focused even when the surrounding lobby fills a wide monitor. */
.community-detail { width: 100%; max-width: 780px; margin-inline: auto; }
.community-detail > h1 { margin: 0 0 18px; font-size: 28px; }
.community-detail .community-post { margin-bottom: 0; }
.community-detail .post-content { padding: 26px 28px 14px; }
.community-detail .post-body p { font-size: 16px; line-height: 1.85; }
.community-detail .post-body.is-clamped p { display: block; overflow: visible; }
.community-detail .post-media .game-art { max-height: 240px; }
.community-detail .post-thread { padding: 24px 28px; border: 1px solid var(--border); border-radius: 0 0 var(--community-radius) var(--community-radius); background: var(--surface); }
.community-detail .community-post .post-thread { border-right: 0; border-bottom: 0; border-left: 0; }
.community-detail .post-content > .post-thread { margin: 18px -28px -14px; }
.community-detail .thread-list { gap: 18px; }
.community-detail .thread-bubble { padding: 12px 15px; }
.community-detail .thread-bubble p { font-size: 15px; }

/* The compact entry point opens the existing composer in a real dialog. */
dialog.community-composer-modal { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 32px); }
dialog.community-composer-modal[open] { display: flex; flex-direction: column; overflow: hidden; }
.community-composer-modal .modal-header { flex-shrink: 0; padding: 24px 26px 20px; border-bottom: 1px solid var(--border); }
.community-composer-modal .modal-header > div { min-width: 0; }
.community-composer-modal .modal-header h2 { font-size: 26px; overflow-wrap: anywhere; }
.community-composer-modal .modal-header p { margin-top: 8px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.community-composer-modal .modal-header .icon-button { width: 44px; height: 44px; }
.community-composer-modal .modal-body { min-height: 0; overflow-y: auto; padding: 24px 26px; }
.community-composer-modal .community-composer { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.community-composer-modal .community-composer textarea { min-height: 180px; max-height: 40dvh; font-size: 16px; resize: vertical; }
.community-composer-modal .composer-prompts { gap: 8px; }
.community-composer-modal .composer-prompt { min-height: 44px; padding: 8px 12px; border-style: solid; }
.community-composer-modal .composer-prompt[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.community-composer-modal .composer-game { max-width: 300px; }
.community-composer-modal .composer-game select { min-height: 44px; padding-top: 9px; padding-bottom: 9px; font-size: 16px; }
.community-composer-modal .composer-bottom { flex-wrap: wrap; }
.community-composer-modal .composer-hint { flex-basis: 100%; order: 2; margin-left: 0; font-size: 12px; }
.community-composer-modal .composer-count { margin-left: auto; font-size: 12px; }
.community-composer-modal .auth-message { font-size: 14px; }
.community-composer-modal .form-field > select { width: 100%; font-size: 16px; }
.community-extras { margin-top: 28px; border-top: 1px solid var(--border); }
.community-extras > summary { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 12px 0; color: var(--muted); cursor: pointer; list-style: none; }
.community-extras > summary::-webkit-details-marker { display: none; }
.community-extras > summary::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--accent); }
.community-extras[open] > summary::after { content: '−'; }
.community-extras > summary > .icon { width: 19px; height: 19px; color: var(--accent); }
.community-extras .community-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 18px; padding-top: 10px; }
.community-extras .community-side > .panel { min-width: 0; margin: 0; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .community-game-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 14%, transparent); }
  .community-game-card:hover .community-game-cover > :is(.game-art, img) { transform: scale(1.045); filter: saturate(1.08); }
  .community-page .post-media:hover .game-art { transform: scale(1.025); }
  .community-topic-filter:hover, .community-following:hover { border-color: var(--accent); color: var(--text); }
}
@media (min-width: 1500px) {
  .community-feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-feed-grid > .is-featured { grid-column: span 2; }
  .community-feed-grid > .is-featured .post-media .game-art { max-height: 330px; }
}
@media (max-width: 1100px) {
  .community-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-game-banner { flex-wrap: wrap; }
  .community-banner-actions { flex-shrink: 1; }
  .community-composer-modal .composer-hint { display: block; }
}
@media (max-width: 760px) {
  .community-feed-grid { grid-template-columns: 1fr; gap: 16px; }
  .community-feed-grid > .is-featured { grid-column: auto; grid-row: auto; }
  .community-hero { min-height: 180px; }
  .community-hero-copy { padding: 22px 24px; }
  .community-game-banner { min-height: 205px; padding: 22px; }
  .community-feed-toolbar { align-items: stretch; }
  .community-feed-toolbar .feed-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .community-page .feed-tab { min-width: 0; justify-content: center; padding-inline: 6px; white-space: normal; overflow-wrap: anywhere; }
  .community-feed-toolbar input[type='search'] { width: 100%; }
  .community-detail .post-media .game-art { max-height: none; }
}
@media (max-width: 680px) {
  .community-page { --community-radius: 14px; }
  .community-hero { min-height: 164px; }
  .community-hero::after { background: linear-gradient(90deg, #180b32f2, #180b32b8 52%, #180b3238); }
  .community-hero-copy { max-width: 82%; padding: 20px; }
  .community-page .community-hero-copy .eyebrow { display: none; }
  :root body .community-hero-copy h1 { font-size: 32px; line-height: 1.05; }
  .community-hero-copy p { max-width: 250px; margin-top: 9px; font-size: 13px; line-height: 1.55; }
  .community-section-heading { margin: 25px 0 14px; align-items: flex-start; }
  :root body .community-section-heading h2 { font-size: 25px; }
  .community-section-heading p { font-size: 13px; }
  .community-section-heading .community-composer-trigger { width: 100%; }
  .community-section-heading > [data-action='social-compose'] { width: 100%; }
  .community-game-grid { gap: 12px; }
  .community-game-copy { padding: 12px; }
  :root body .community-game-copy h3 { font-size: 19px; }
  .community-game-copy > p { font-size: 12px; margin: 6px 0 12px; }
  .community-enter { font-size: 15px; }
  .community-face-stack :is(.avatar, img) { width: 24px; height: 24px; }
  .community-game-banner { min-height: 205px; align-items: flex-start; justify-content: flex-end; flex-direction: column; gap: 16px; padding: 20px; }
  :root body .community-banner-copy h1 { font-size: 32px; }
  .community-banner-copy p { font-size: 13px; }
  .community-banner-actions { width: 100%; gap: 8px; }
  .community-banner-actions .button { flex: 1; }
  .community-topic-filters { flex-wrap: wrap; overflow: visible; padding: 4px 0; }
  .community-topic-filter { padding-inline: 12px; }
  .community-feed-toolbar { gap: 10px; margin: 18px 0 14px; }
  .community-page .post-content { padding: 18px 16px 10px; }
  .community-page .post-body p { font-size: 15px; }
  .community-page .community-post .post-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .community-page .community-post .post-action { gap: 5px; padding-inline: 3px; }
  .community-page .community-post .post-action span { display: inline; }
  .community-page .community-post .post-action[data-action='social-share'] { width: 44px; padding-inline: 0; }
  .community-page .community-post .post-action[data-action='social-share'] span { display: none; }
  .community-page .post-thread { padding: 18px 16px; }
  .community-page .thread-input { padding-left: 10px; gap: 5px; }
  .community-page .thread-input .button { padding-inline: 10px; }
  .community-detail .post-content { padding: 20px 18px 12px; }
  .community-detail .post-body p { font-size: 16px; }
  .community-detail .post-thread { padding: 20px 18px; }
  .community-detail .post-content > .post-thread { margin: 18px -18px -12px; }
  .community-detail .thread-item { gap: 8px; }
  .community-detail .thread-bubble { padding: 10px 12px; }
  .community-detail .thread-bubble p { font-size: 14px; }
  .community-pagination { gap: 10px; }
  dialog.community-composer-modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .community-composer-modal .modal-header { padding: 20px 18px 16px; }
  .community-composer-modal .modal-body { padding: 20px 18px; }
  .community-composer-modal .community-composer > .avatar { display: none; }
  .community-composer-modal .community-composer textarea { min-height: 160px; }
  .community-composer-modal .composer-game { flex-basis: 100%; max-width: none; }
  .community-composer-modal .composer-hint { display: none; }
  .community-extras .community-side { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 380px) {
  .community-page .feed-tab .icon { display: none; }
  .community-game-grid { gap: 9px; }
  .community-game-copy { padding: 10px; }
  :root body .community-game-copy h3 { font-size: 18px; }
  .community-page .community-post .post-action { font-size: 12px; }
  .community-page .community-post .post-action .icon { width: 16px; height: 16px; }
  .community-banner-actions .button { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .community-page *, .community-page *::before, .community-page *::after,
  .community-composer-modal *, .community-composer-modal *::before, .community-composer-modal *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .community-page :is(.community-game-card, .community-post, .game-art, .post-media, .button, .scroll-reveal) { transform: none !important; }
  .community-page .scroll-reveal { opacity: 1 !important; }
}
