.edc-header-nav-links,
.edc-header-profile-card {
  display: none !important;
}

.edc-site-header {
  z-index: 999 !important;
}

main,
.edc-community,
main.edc-post-page {
  padding-top: 116px !important;
  padding-bottom: 40px !important;
}

.community-header {
  margin-top: 0 !important;
}

.edc-community-title {
  font-size: 1.5rem !important;
}

.edc-breadcrumb {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.6);
  position: relative;
  z-index: 10;
}

.edc-breadcrumb-segment:not(.is-current) {
  opacity: 0.6;
}

.edc-community-filterSticky {
  top: 6.75rem;
}

.edc-community-actions {
  margin-top: 0.75rem;
  gap: 0.55rem;
}

.edc-community-filterRow {
  gap: 0.65rem !important;
}

.edc-community-createTrigger {
  min-height: 44px;
  font-size: 0.875rem;
  padding: 0.62rem 0.95rem;
}

.edc-community-createPlus {
  width: 1.5rem;
  height: 1.5rem;
}

.edc-community-boardHead {
  gap: 0.75rem;
}

.edc-community-board {
  padding: 1.25rem;
}

.edc-community-board-icon-panel,
.edc-community-boardIconWrap {
  width: 58px;
  height: 58px;
}

.edc-community-boardIcon {
  width: 2rem;
  height: 2rem;
}

.edc-community-boardGhostStats {
  margin-top: 0.2rem;
  gap: 0.4rem;
}

.edc-community-boardCta {
  width: 100%;
  max-height: 45px;
  min-height: 40px;
  justify-content: center;
  margin-top: 0;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.edc-community-boardFooter {
  margin-top: auto;
}

.edc-community-subsection-card .edc-community-subsection-content {
  text-align: left !important;
}

.edc-community-subsection-card .edc-community-subsection-content * {
  text-align: left !important;
}

.edc-community-subsection-card .edc-community-boardTitle {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
}

.edc-community-subsection-card .edc-community-subsection-content ul {
  margin-left: 0 !important;
  padding-left: 1.25rem !important;
}

.edc-community-subsection-card .edc-community-subsection-content ul li {
  margin-left: 0 !important;
}

.edc-community-subsection-card .edc-community-subsection-open {
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  max-height: 44px !important;
  line-height: 1 !important;
  flex: none !important;
  width: 100% !important;
  margin-top: 1.5rem !important;
  align-self: flex-end;
}

.edc-community-subsection-card .edc-community-subsection-open svg {
  position: relative !important;
  display: inline-block !important;
  vertical-align: middle !important;
  width: 16px !important;
  height: 16px !important;
  margin-left: 8px !important;
  flex: 0 0 auto !important;
}

.edc-community-subsection-card .edc-community-subsection-open::after {
  content: "" !important;
  position: absolute !important;
  right: 12px !important;
  display: inline-block !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 16px !important;
  height: 16px !important;
}

.edc-community-categories {
  gap: 1.5rem;
}

/* Board view: full-width CTA, horizontal sub-board chips */
.edc-boardSurface {
  padding: 1rem 0.95rem 1.1rem;
  border-radius: 1.15rem;
}

.edc-board-subsScroll {
  flex-wrap: nowrap;
  padding-bottom: 0.35rem;
}

.edc-board-subLink {
  flex-shrink: 0;
}

.edc-board-jumpNav {
  gap: 0.4rem;
}

.edc-board-cluster {
  scroll-margin-top: 7rem;
}

/* Moderation flyout: keep inside viewport on narrow phones */
.edc-modMenu {
  max-width: min(18rem, calc(100vw - 1.25rem));
  right: 0;
  left: auto;
}

.edc-community-topicCard.edc-topicCard--modOpen {
  z-index: 20;
}

/* Single post: comfortable reading width on phones */
@media (max-width: 767px) {
  main.edc-post-page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .edc-post-page__title {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .edc-post-page__metaRow {
    gap: 0.4rem;
  }

  .edc-post-page__guestStrip {
    flex-direction: column;
    align-items: stretch;
  }

  .edc-post-page__composer .rounded-2xl {
    border-radius: 1.15rem;
  }
}

@media (max-width: 639px) {
  .edc-community-actions .edc-community-actionBtn {
    width: 100%;
  }

  .edc-community-categoryHead {
    grid-template-columns: 1fr;
  }

  .edc-community-categoryOpen {
    width: 100%;
  }

  .edc-community-boardCta {
    width: 100%;
    justify-content: center;
    margin-top: 0;
  }

  .edc-community-boardGhostStats {
    margin-top: 0.25rem;
  }
}

/* Directory list: skeleton overlay during fetch — when idle, fully hide (opacity 0 + backdrop-blur can leave a faint panel). */
.edc-directory-list-mount .edc-directory-skeleton {
  visibility: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: transparent;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    backdrop-filter 0.2s ease;
}

.edc-directory-list-mount.is-edc-loading .edc-directory-skeleton {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Reserve space for pagination controls to reduce CLS when page/sort changes */
#edc-directory-pagination.edc-directory-pagination-shell,
.edc-directory-pagination-shell {
  min-height: 152px;
  box-sizing: border-box;
}

.edc-directory-mobibar {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}
