.community-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gym-soft,#e3f5ea);
  color: var(--gym-accent,#08783f);
  font: 800 13px Arial, sans-serif;
  border: 1px solid #d9e2dc;
}
.community-avatar > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.community-profile,
.community-chat {
  color: #17221b;
  font: 16px/1.5 Arial, sans-serif;
  max-width: 760px;
  margin: 0 auto;
  min-width: 0;
}
.community-profile *,
.community-chat * {
  box-sizing: border-box;
}
.community-page-heading {
  margin-bottom: 28px;
}
.community-page-heading h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.16;
  letter-spacing: -1.2px;
  margin: 0 0 12px;
}
.community-page-heading p {
  margin: 0;
  color: #4e5c53;
  font-size: 16px;
}
.community-eyebrow {
  display: block;
  color: var(--gym-accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-weight: 800;
  margin-bottom: 12px;
}
.community-profile-card {
  background: #fff;
  border: 1px solid #dbe3dd;
  border-radius: 20px;
  padding: 30px;
}
.community-profile-identity {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.community-profile-identity > .community-avatar {
  width: 88px;
  height: 88px;
  font-size: 26px;
}
.community-profile-identity h2 {
  font-size: 25px;
  margin: 0 0 4px;
  letter-spacing: -.6px;
}
.community-profile-identity p {
  margin: 0;
  color: #526056;
}
.community-photo-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.community-upload,
.community-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 16px;
  border: 1px solid #cad6ce;
  border-radius: 10px;
  font: 700 14px/1.4 Arial, sans-serif;
  cursor: pointer;
  background: #fff;
  color: #24372b;
  position: relative;
  overflow: hidden;
  margin: 0;
}
.community-upload {
  background: var(--gym-accent);
  color: #fff;
  border-color: var(--gym-accent);
}
.community-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.community-upload:has(input:focus-visible) {
  outline: 3px solid #1f2922;
  outline-offset: 3px;
}
.community-upload:has(input:disabled) {
  opacity: .6;
  cursor: wait;
}
.community-secondary:hover {
  background: var(--gym-soft);
}
.community-hint {
  font-size: 13px;
  line-height: 1.6;
  color: #556259;
  margin: 12px 0 0;
}
.community-profile-details {
  display: block;
  margin: 24px 0;
  padding: 20px 0;
  border-block: 1px solid #e4e9e6;
}
.community-profile-details > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.community-profile-details dt {
  font-size: 14px;
  color: #526056;
}
.community-profile-details dd {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}
.community-profile-links {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.community-profile-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 18px 22px;
  border: 1px solid #dbe3dd;
  background: #fff;
  border-radius: 14px;
  color: #213b29;
  text-decoration: none;
  font-weight: 700;
}
.community-profile-links a:hover {
  border-color: var(--gym-accent);
  background: var(--gym-soft);
}
.community-profile-links svg {
  width: 20px;
  height: 20px;
}
.community-demo-note {
  font-size: 12px;
  color: #5c6860;
  margin: 18px 0 0;
  line-height: 1.6;
}
.community-status {
  font-size: 13px;
  color: var(--gym-accent);
  margin: 8px 0 0;
  min-height: 0;
}
.community-status:empty {
  display: none;
}
.community-status.is-error {
  color: #a12622;
  font-weight: 700;
}
.community-conversation {
  background: #fff;
  border: 1px solid #dbe3dd;
  border-radius: 20px;
  overflow: hidden;
}
.community-log {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: auto;
  max-height: min(520px, calc(var(--community-viewport-height,100dvh) - 300px));
  min-height: 120px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.community-message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 92%;
  min-width: 0;
}
.community-message-body {
  min-width: 0;
}
.community-message-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 6px;
  padding-inline: 3px;
}
.community-message-meta strong {
  font-size: 13px;
}
.community-message-meta time {
  font-size: 11px;
  color: #59675e;
}
.community-message p {
  margin: 0;
  padding: 13px 16px;
  border-radius: 16px 16px 16px 4px;
  background: #f0f3f1;
  color: #1c2b21;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.community-message.is-own {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.community-message.is-own .community-message-meta {
  justify-content: flex-end;
}
.community-message.is-own p {
  background: var(--gym-soft);
  border-radius: 16px 16px 4px 16px;
}
.community-message > .community-avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
}
.community-composer {
  padding: 18px 24px 22px;
  border-top: 1px solid #e2e8e4;
  background: white;
  margin: 0;
}
.community-composer > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.community-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.community-compose-row textarea {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  max-height: 140px;
  resize: vertical;
  border: 1px solid #c5d0c9;
  border-radius: 12px;
  background: #f9fbfa;
  padding: 13px 14px;
  color: #1c2b21;
  font: 16px/1.5 Arial, sans-serif;
}
.community-compose-row button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 12px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gym-accent);
  color: #fff;
  cursor: pointer;
}
.community-compose-row svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.community-profile :focus-visible,
.community-chat :focus-visible {
  outline: 3px solid var(--gym-accent);
  outline-offset: 3px;
}
body:has(.community-chat) {
  padding-bottom: calc(120px + env(safe-area-inset-bottom) + var(--community-keyboard-inset,0px));
}
body:has(.community-chat) .gym-dock {
  bottom: calc(18px + env(safe-area-inset-bottom) + var(--community-keyboard-inset,0px));
}
@media (max-width: 600px) {
  .community-profile-card {
    padding: 24px 20px;
  }
  .community-profile-identity {
    gap: 16px;
  }
  .community-profile-identity > .community-avatar {
    width: 72px;
    height: 72px;
    font-size: 22px;
  }
  .community-profile-identity h2 {
    font-size: 22px;
  }
  .community-profile-details > div {
    flex-direction: column;
    gap: 6px;
  }
  .community-page-heading {
    margin-bottom: 22px;
  }
  .community-log {
    padding: 20px 14px;
    gap: 20px;
  }
  .community-message {
    max-width: 100%;
    gap: 8px;
  }
  .community-message p {
    padding: 11px 13px;
  }
  .community-message-meta {
    gap: 4px 8px;
  }
  .community-composer {
    padding: 16px;
  }
  .community-profile-links a {
    padding: 16px 20px;
  }
  .community-photo-controls {
    gap: 8px;
  }
}
body:has(.community-chat) {
  overflow: hidden;
  padding-bottom: 0;
}
.staff-navigation:has(.community-chat) .prototype-tools,
.staff-navigation:has(.community-chat) .topbar,
.staff-navigation:has(.community-chat) footer {
  display: none;
}
.community-chat {
  --community-shell-top:0px;
  --community-shell-left:0px;
  --community-dock-space:108px;
  position: fixed;
  z-index: 30;
  top: calc(var(--community-viewport-top,0px) + var(--community-shell-top) + env(safe-area-inset-top));
  left: var(--community-shell-left);
  right: 0;
  width: calc(100% - var(--community-shell-left) - 32px);
  height: calc(var(--community-viewport-height,100dvh) - var(--community-shell-top) - var(--community-dock-space) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
}
.community-chat .community-conversation {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.community-chat .community-log {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.community-chat .community-message {
  flex-shrink: 0;
}
.community-chat .community-composer {
  flex-shrink: 0;
  padding: 12px 16px;
}
.community-chat .community-compose-row {
  align-items: center;
}
.community-chat .community-compose-row textarea {
  min-height: 48px;
  max-height: 100px;
  resize: none;
}
.community-chat .community-composer > label,
.community-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 901px) {
  .client-navigation .community-chat {
    --community-shell-top:var(--gym-header);
    --community-shell-left:var(--gym-rail);
    --community-dock-space:16px;
  }
}
@media (max-width: 900px) {
  .client-navigation:has(.community-chat) .gym-header {
    display: none;
  }
  .community-chat {
    width: 100%;
    padding-top: 0;
    max-width: none;
    --community-dock-space:98px;
  }
  .community-chat .community-conversation {
    border: 0;
    border-bottom: 1px solid #e2e8e4;
    border-radius: 0;
  }
  .community-chat .community-log {
    padding: 20px 16px;
  }
}
.community-chat [data-community-pins] {
  flex-shrink: 0;
  min-height: 0;
}
.community-pins {
  background: var(--gym-soft);
  border-bottom: 1px solid #d7e2da;
}
.community-pins summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  min-height: 52px;
  cursor: pointer;
  list-style: none;
  color: #203b2a;
}
.community-pins summary::-webkit-details-marker {
  display: none;
}
.community-pins summary:after {
  content: "⌄";
  margin-left: auto;
  font-size: 20px;
}
.community-pins[open] summary:after {
  content: "⌃";
}
.community-pins summary > span {
  min-width: 0;
  flex: 1;
}
.community-pins summary strong {
  font-size: 12px;
  display: block;
}
.community-pin-preview {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.community-pin-action svg,
.community-pin-label svg,
.community-pins summary svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.community-pin-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  min-height: 44px;
  min-width: 44px;
  background: transparent;
  color: #526157;
  font: 600 12px/1.3 Arial, sans-serif;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  margin: 2px 0 0;
}
.community-pin-action:hover,
.community-pin-action[aria-pressed=true] {
  color: var(--gym-accent);
  background: var(--gym-soft);
}
.community-pin-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gym-accent);
  margin: 6px 3px 0;
}
.community-message.is-own .community-pin-action {
  float: right;
}
.community-message.is-own .community-pin-label {
  justify-content: flex-end;
}
.community-pinned-list {
  max-height: min(150px, 22dvh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 12px 8px;
}
.community-pinned-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #cedbd2;
}
.community-pinned-message {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  text-align: left;
  border: 0;
  background: transparent;
  color: #22352a;
  padding: 10px 4px;
  font: 13px/1.5 Arial, sans-serif;
  cursor: pointer;
  border-radius: 6px;
}
.community-pinned-message strong {
  display: block;
  font-size: 12px;
}
.community-pinned-message span {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.community-message:focus {
  outline: 2px solid var(--gym-accent);
  outline-offset: 4px;
  border-radius: 12px;
}
