/* Community personal pages: existing dialog, shared motion, no new animation. */
#communityMemberProfileDialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  height: auto;
  border: 1px solid var(--line);
  margin: auto;
  border-radius: 24px;
  scroll-padding-block: 72px 24px;
}
#communityMemberProfileContent { padding: 28px; }
#communityMemberProfileDialog .community-profile-hero { min-height: 180px; }
#communityMemberProfileDialog .community-profile-hero > div { min-width: 0; }
#communityMemberProfileDialog .community-profile-hero h2 {
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  overflow-wrap: anywhere;
}
#communityMemberProfileDialog .community-profile-actions {
  position: static;
  margin: 0 -28px;
  padding: 18px 28px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper, #fff);
  backdrop-filter: none;
}
.community-profile-page-layout { display: grid; gap: 24px; margin-top: 24px; }
.community-profile-story { min-width: 0; align-self: start; }
.community-profile-story > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px; min-height: 48px; border: 1px solid var(--line);
  border-radius: 14px; font-weight: 850; cursor: pointer; list-style: none;
  background: var(--soft);
}
.community-profile-story > summary::-webkit-details-marker { display: none; }
.community-profile-story[open] > summary span { transform: rotate(45deg); }
.community-profile-story .community-profile-section { padding: 16px; }
.community-profile-activity { min-width: 0; }
.community-profile-activity-heading .eyebrow { margin: 0 0 6px; }
.community-profile-activity-heading h3 { margin: 0 0 18px; font-size: 1.45rem; }
.community-profile-activity-tabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  padding: 5px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--soft); margin-bottom: 16px;
}
.community-profile-activity-tabs button {
  min-width: 0; min-height: 46px; padding: 10px 5px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink); font: inherit; font-weight: 850;
  cursor: pointer;
}
.community-profile-activity-tabs button[aria-selected="true"] {
  color: #15251c; background: var(--lime, #b9e531);
}
.community-profile-activity-tabs button:focus-visible,
.community-profile-story > summary:focus-visible,
.community-profile-activity-card button:focus-visible {
  outline: 3px solid var(--green); outline-offset: 3px;
}
#communityProfileActivityPanel { min-height: 300px; outline-offset: 4px; }
.community-profile-activity-privacy {
  color: var(--muted); font-size: .875rem; line-height: 1.5; margin: 0 0 16px;
}
.community-profile-activity-card {
  min-width: 0; padding: 20px; margin-bottom: 14px; border: 1px solid var(--line);
  border-radius: 18px; background: var(--paper, #fff); overflow-wrap: anywhere;
}
.community-profile-activity-meta {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px;
  color: var(--muted); font-size: .8rem; line-height: 1.5;
}
.community-profile-activity-meta > span { color: var(--green); font-weight: 850; }
.community-profile-activity-card h3 { margin: 12px 0 8px; font-size: 1.125rem; line-height: 1.4; }
.community-profile-activity-excerpt { white-space: pre-wrap; margin: 0; line-height: 1.65; }
.community-profile-activity-card-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 10px;
}
.community-profile-activity-card-footer small { color: var(--muted); }
.community-profile-activity-card-footer button { min-height: 44px; }
.community-profile-activity-empty {
  padding: 32px 20px; border: 1px dashed var(--line); border-radius: 18px;
  text-align: center; background: var(--soft); line-height: 1.6;
}
.community-profile-activity-empty h3 { font-size: 1.1rem; }
.community-profile-activity-empty p { color: var(--muted); }
.community-profile-activity-loading { padding: 10px 0; }
.community-profile-activity-loading .community-profile-detail-skeleton span {
  width: 100%; height: 142px;
}
.community-personal-page-entry {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px;
}
.community-personal-page-entry button { min-height: 44px; }
.community-personal-page-entry small { color: var(--muted); }
html[data-theme="dark"] #communityMemberProfileDialog .community-profile-actions,
html[data-theme="dark"] .community-profile-activity-card { background: #19281f; }
html[data-theme="dark"] .community-profile-activity-meta > span { color: var(--lime); }
html[data-theme="dark"] .community-profile-activity-tabs button:not([aria-selected="true"]) { color: #f4f8ef; }
@media (min-width: 800px) {
  .community-profile-page-layout { grid-template-columns: minmax(230px, .8fr) minmax(0, 1.5fr); }
  .community-profile-story .community-profile-facts { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  #communityMemberProfileDialog {
    width: 100vw; max-width: 100vw; max-height: calc(100dvh - env(safe-area-inset-top));
    margin: auto 0 0; border-radius: 22px 22px 0 0;
  }
  #communityMemberProfileContent { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
  #communityMemberProfileDialog .community-profile-hero { margin: -20px -20px 0; padding: 30px 62px 24px 20px; gap: 14px; }
  #communityMemberProfileDialog .community-profile-hero .community-avatar { width: 64px; height: 64px; flex-basis: 64px; }
  #communityMemberProfileDialog .community-profile-actions { margin: 0 -20px; padding: 16px 20px; }
  .community-profile-activity-card { padding: 16px; }
  .community-profile-activity-tabs button { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  #communityMemberProfileDialog .community-profile-detail-skeleton span,
  #communityMemberProfileDialog .community-profile-refreshing span { animation: none; }
}
@media (max-width: 359px) {
  .community-profile-activity-tabs button { font-size: .85rem; padding-inline: 2px; }
}
