.fg-community-page,
.fg-community-dialog,
.fg-community-tools,
.fg-community-action {
	--fg-surface: var(--social-feed-background, #f5f7fb);
	--fg-panel: var(--social-panel-background, #fff);
	--fg-border: var(--social-panel-border, #dce5f1);
	--fg-ink: var(--social-page-ink, #142746);
	--fg-button-border: color-mix(in srgb, var(--fg-ink) 24%, var(--fg-border));
}

.fg-community-page {
	min-width: 0;
	padding: clamp(12px, 1.4vw, 22px);
	border-radius: 10px;
	background: var(--fg-surface);
	color: var(--fg-ink);
}

.fg-community-heading,
.fg-community-nav,
.fg-community-membership {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.fg-community-heading { justify-content: space-between; margin-bottom: 14px; }
.fg-community-nav { margin-bottom: 14px; }
.fg-community-page .fg-community-heading h1,
.fg-community-page > h1,
.fg-community-page .fg-manage .fg-community-heading h1 {
	margin: 0;
	color: inherit;
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	line-height: 1.25;
	overflow-wrap: anywhere;
}
.fg-community-page > h1 { margin-bottom: 14px; }

.fg-community-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 12px;
}

.fg-community-panel,
.fg-community-page .fg-manage-section,
.fg-community-page .fg-manage [role="status"] {
	min-width: 0;
	box-sizing: border-box;
	padding: clamp(12px, 1.25vw, 20px);
	border: 1px solid var(--fg-border);
	border-radius: 9px;
	background: var(--fg-panel);
	color: var(--fg-ink);
	box-shadow: none;
	overflow-wrap: anywhere;
}

.fg-community-panel > :last-child,
.fg-community-details > :last-child { margin-bottom: 0; }

.fg-community-card { display: flex; flex-direction: column; gap: 8px; }
.fg-community-card-header { display: flex; align-items: baseline; gap: 8px; }
.fg-community-card-icon { flex: none; }
.fg-community-page .fg-community-card-title,
.fg-community-page .fg-manage-section h2,
.fg-community-dialog h2 {
	margin: 0;
	color: inherit;
	font-size: 1.1rem;
	line-height: 1.3;
}
.fg-community-card-title a { color: inherit; }
.fg-community-card-visibility { opacity: .8; font-size: .85em; }
.fg-community-card .fg-catalog-description { margin: 0; }
.fg-community-membership { margin-top: auto; padding-top: 5px; }
.fg-community-membership form { margin: 0; }

.fg-community-page .fg-manage { width: auto; margin: 0; color: inherit; }
.fg-community-page .fg-manage-section { margin: 0; }
.fg-community-page .fg-manage-section + .fg-manage-section { margin-top: 12px; }
.fg-community-page .fg-manage-section h2 { padding: 0; margin-bottom: 10px; border: 0; }
.fg-community-page .fg-manage-section label { color: inherit; }
.fg-community-page .fg-manage-section > ul > li { border-color: var(--fg-border); }
.fg-community-page .fg-user-search,
.fg-community-page .fg-user-list,
.fg-community-dialog .inputbox {
	border-color: var(--fg-border);
	border-radius: 7px;
	background: var(--fg-panel);
	color: var(--fg-ink);
}
.fg-community-page .fg-user-option:is(:hover, .is-active) { background: var(--fg-surface); }

dialog.fg-community-dialog {
	border: 1px solid var(--fg-border);
	background: var(--fg-panel);
	color: var(--fg-ink);
}
.fg-community-dialog h2 { margin-bottom: 14px; }
.fg-community-dialog label { color: inherit; }

.fg-community-action,
.fg-community-page :is(.button1, .button2, .fg-community-membership button),
.fg-community-page .fg-manage :is(.button1, .button2),
.fg-community-tools :is(.button1, summary),
.fg-community-dialog :is(.button1, .button2),
.fg-community-dialog .fg-create__actions :is(.button1, .button2) {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 0;
	padding: 6px 11px;
	border: 1px solid var(--fg-button-border);
	border-radius: 7px;
	background: var(--fg-panel);
	color: var(--fg-ink);
	box-shadow: none;
	font: inherit;
	font-weight: 400;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.fg-community-page [aria-current="page"],
.fg-community-action:hover,
.fg-community-page :is(.button1, .button2, .fg-community-membership button):is(:hover, :focus-visible),
.fg-community-tools :is(.button1, summary):hover,
.fg-community-page .fg-manage :is(.button1, .button2):is(:hover, :focus-visible),
.fg-community-dialog .fg-create__actions :is(.button1, .button2):hover,
.fg-community-dialog :is(.button1, .button2):hover {
	background: var(--fg-surface);
	color: var(--fg-ink);
	text-decoration: none;
}

.fg-community-tools .fg-feed-menu__list ul {
	min-width: min(16rem, 80vw);
	border-color: var(--fg-border);
	border-radius: 7px;
	background: var(--fg-panel);
	color: var(--fg-ink);
}
