body.bf-community-page :is(.site-main, .pm-main) {
  width: min(calc(100% - 32px), var(--bf-community-container));
  max-width: var(--bf-community-container);
  margin-inline: auto;
  padding-bottom: var(--bf-space-10);
  box-sizing: border-box;
}

body.bf-community-page :is(
  .market-filter-panel,
  .market-flow-card,
  .market-card,
  .team-filter,
  .form-card,
  .team-list-panel,
  .listing-card,
  .official-team-card,
  .guide-detail-card,
  .wanted-card,
  .rating-card,
  .chat-layout,
  .chat-info,
  .trade-context-card,
  .inventory-filter-wrap,
  .inventory-loadout,
  .inventory-collection,
  .inventory-card,
  .progress-card,
  .profile-builder-panel,
  .pm-balance-card,
  .pm-daily-card,
  .pm-weekly-card,
  .pm-campaign-card,
  .pm-task-card,
  .pm-goal,
  .shop-balance-panel,
  .shop-catalog,
  .shop-card,
  .shop-modal-card
) {
  border-radius: var(--bf-radius-card);
}

body.bf-community-page :is(
  .market-hero,
  .rating-intro-card,
  .inventory-hero,
  .progress-hero,
  .pm-hero,
  .shop-hero
) {
  border-radius: var(--bf-radius-hero);
}

body.bf-community-page :is(
  .market-hero,
  .rating-intro-card,
  .inventory-hero,
  .progress-hero,
  .pm-hero,
  .shop-hero
) h1,
body.bf-community-page .team-page-title {
  font-size: var(--bf-title-community);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

body.bf-community-page main h2 {
  font-size: var(--bf-title-section);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

body.bf-community-page main h3 {
  line-height: 1.4;
}

body.bf-community-page main :is(p, li) {
  line-height: var(--bf-line-body);
}

body.bf-community-page :is(
  .pm-breadcrumb,
  .inventory-subnav,
  .shop-subnav
) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--bf-space-2);
  min-height: var(--bf-control-height);
  margin-block: var(--bf-space-4);
}

body.bf-community-page main :is(
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="url"],
  select,
  textarea
),
body.bf-community-page :is(.modal-container, .profile-picker-modal, .shop-modal) :is(
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="url"],
  select,
  textarea
) {
  min-width: 0;
  min-height: var(--bf-control-height);
  border-radius: var(--bf-radius-control);
  box-sizing: border-box;
  font: inherit;
}

body.bf-community-page :is(
  .btn-market-post,
  .btn-action,
  .btn-submit-post,
  .market-load-more,
  .market-alert-btn,
  .team-filter .btn,
  .team-template-btn,
  .btn-bump,
  .btn-close-team,
  .btn-chat,
  .btn-chat-wait,
  .btn-join,
  .official-team-card button,
  .trust-lookup-form button,
  .rating-form-card button,
  .rating-summary-share-btn,
  .related-button,
  .mark-read-form button,
  .btn-send-offer,
  .chat-form button,
  .empty-state-actions a,
  .empty-state-actions button,
  .inventory-primary-link,
  .inventory-secondary-link,
  .inventory-filter,
  .inventory-action-button,
  .progress-view-tab,
  .progress-filter-button,
  .profile-button,
  .profile-mini-button,
  .profile-step-button,
  .profile-step-nav,
  .profile-inline-pick,
  .pm-main button,
  .pm-task-action a,
  .pm-goal a,
  .point-shop-main button,
  .shop-modal button,
  .shop-primary-link,
  .shop-secondary-link,
  .shop-action-link,
  .shop-action-button
) {
  min-height: var(--bf-control-height);
  border-radius: var(--bf-radius-control);
  box-sizing: border-box;
}

body.bf-community-page :is(
  .rating-filter-chip,
  .conversation-filter,
  .shop-filters button
) {
  min-height: 40px;
  border-radius: var(--bf-radius-control);
  box-sizing: border-box;
}

body.bf-community-page :is(
  .market-filter-grid,
  .team-filter-row,
  .rating-filter-list,
  .conversation-filters,
  .inventory-filters,
  .progress-filter-bar,
  .shop-filters
) {
  gap: var(--bf-space-2);
}

body.bf-community-page :is(
  .market-card-list,
  .inventory-grid,
  .progress-grid,
  .shop-grid
) {
  gap: var(--bf-space-4);
}

body.bf-community-page main [id] {
  scroll-margin-top: 96px;
}

body.bf-community-page :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--bf-focus);
  outline-offset: 3px;
}

body.bf-community-page main img {
  max-width: 100%;
  height: auto;
}

body.bf-community-page :is(button, summary, a[href]) {
  touch-action: manipulation;
}

@media (max-width: 760px) {
  body.bf-community-page :is(.site-main, .pm-main) {
    width: calc(100% - 20px);
    padding-bottom: var(--bf-space-8);
  }

  body.bf-community-page :is(
    .market-hero,
    .rating-intro-card,
    .inventory-hero,
    .progress-hero,
    .pm-hero,
    .shop-hero
  ) {
    border-radius: var(--bf-radius-card);
  }

  body.bf-community-page :is(
    .market-hero,
    .rating-intro-card,
    .inventory-hero,
    .progress-hero,
    .pm-hero,
    .shop-hero
  ) h1,
  body.bf-community-page .team-page-title {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
  }

  body.bf-community-page :is(
    .pm-breadcrumb,
    .inventory-subnav,
    .shop-subnav
  ) {
    margin-block: var(--bf-space-3);
  }
}

@media (max-width: 420px) {
  body.bf-community-page :is(.site-main, .pm-main) {
    width: calc(100% - 16px);
  }

  body.bf-community-page main h2 {
    font-size: clamp(1.2rem, 6vw, 1.45rem);
  }
}

@media print {
  body.bf-community-page :is(.site-main, .pm-main) {
    width: 100%;
    max-width: none;
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bf-community-page *,
  body.bf-community-page *::before,
  body.bf-community-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
