.social-section { margin-top: 24px; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.profile-heading h1 { font-size: 28px; margin: 16px 0 6px; overflow-wrap: anywhere; }
.profile-heading p { margin: 4px 0; font-size: 14px; }
.profile-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 6px; background: var(--brand-black); color: white; font-size: 24px; font-weight: 700; }
.friends-list { display: flex; gap: 12px; flex-wrap: wrap; }
.friend-chip { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; font-size: 14px; }
.friend-chip span { color: var(--muted); font-size: 12px; }
.friendship-actions, .invitation-row, .invitation-row form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.invitation-row { justify-content: space-between; padding-top: 16px; }
.feed-list { max-width: 850px; margin-top: 24px; }
.shared-workout { margin-top: 16px; }
.shared-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shared-header a { display: flex; flex-direction: column; }
.shared-header span, .shared-header time { color: var(--muted); font-size: 13px; }
.shared-workout h3 { font-size: 18px; margin: 24px 0 10px; }
.shared-workout h3 > span { color: var(--muted); font-size: 15px; font-weight: 400; }
.public-caption { white-space: pre-wrap; overflow-wrap: anywhere; }
.reaction-row { display: flex; align-items: center; gap: 14px; padding-top: 12px; font-size: 14px; }
.people-filter { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.people-filter .field { flex: 1; min-width: 160px; }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.person-card { display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.person-card span, .person-card small { color: var(--muted); }
.checkbox-field { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 8px 12px; }
.checkbox-field input { grid-column: 1; grid-row: 1; width: 20px; min-height: 20px; height: 20px; margin-top: 2px; accent-color: #b4241d; }
.checkbox-field label { grid-column: 2; }
.checkbox-field small, .checkbox-field .field-error { grid-column: 2; }
.entry-page .social-profile { max-width: 1100px; margin: 0 auto; padding: 38px 24px; }
.entry-page .social-profile .card { color: #111; }
.entry-page .social-profile > section > h2 { color: #111; }
.entry-page .social-profile .social-section:not(.card) > h2 { color: #fff; }
@media (max-width: 700px) { .people-grid { grid-template-columns: 1fr; } .invitation-row { align-items: flex-start; } }
.logged-in-profile { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.logged-in-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--brand-black); color: #fff; border: 2px solid var(--brand-red); font-size: 16px; font-weight: 700; }
.logged-in-profile strong, .logged-in-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.logged-in-profile strong { font-size: 15px; font-weight: 650; }
.logged-in-profile small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.journal-page nav .profile-nav-link { color: white; border: 1px solid #484848; margin-top: 12px; }
.profile-counters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 22px 0; border-bottom: 1px solid var(--line); gap: 8px; }
.profile-counters a, .journal-page .profile-counters a { display: flex; flex-direction: column; gap: 5px; align-items: center; margin: 0; padding: 8px; color: inherit; }
.profile-counters strong { font-size: 25px; font-weight: 650; }
.profile-counters span { font-size: 13px; }
.follow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.connection-list summary { cursor: pointer; font-size: 17px; font-weight: 600; }
.connection-list .friends-list { margin-top: 20px; }
.journal-page .page-footer, .entry-page .entry-footer {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.journal-page .page-footer > .footer-caption {
  white-space: nowrap;
}
.journal-page .footer-language, .entry-page .footer-language {
  display: inline-flex;
  flex-basis: auto;
  width: auto;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
}
.footer-language .language-form {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: none;
}
.footer-language .language-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.journal-page .footer-language select, .entry-page .footer-language select {
  width: auto;
  min-height: 30px;
  max-width: 112px;
  padding: 4px 2px 4px 8px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #7c7c76;
}
.entry-page .footer-language select {
  color: #aaa;
}
.city-feed-hint { font-size: 14px; margin-top: 20px; }
@media (max-width:600px) { .logged-in-profile strong, .logged-in-profile small { max-width: 180px; } .profile-counters span { font-size: 11px; } .profile-counters strong { font-size: 23px; } }

.profile-bio { white-space: pre-wrap; max-width: 600px; overflow-wrap: anywhere; }
.instagram-link { display: inline-block; font-size: 14px; margin-top: 10px; color: #a5221c; }

.profile-counters a > span, .journal-page .profile-counters a > span { width: auto; display: inline; font-size: 13px; }
.profile-counters { color: var(--ink); }
.entry-page .profile-counters { color: #fff; }
.journal-page .topbar-actions { flex-shrink: 0; }

.profile-social-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; }
.profile-social-links:empty { display: none; }
.profile-social-link { display: inline-flex; align-items: center; gap: 9px; color: #292929; font-size: 12px; }
.profile-social-link strong { font-weight: 600; margin-left: 4px; }
.profile-social-link:hover { color: #a5221c; }
.social-brand-icon { width: 23px; height: 23px; flex-shrink: 0; }

/* Compact social cards retain a single reading order on every screen. */
.user-avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: #202020; color: #fff; font-size: 18px; font-weight: 700; }
.user-avatar.avatar-red { background: #9f302b; }
.user-avatar.avatar-gray { background: #565653; }
.user-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.user-avatar.profile-avatar { width: 64px; height: 64px; font-size: 26px; }
.user-avatar.logged-in-avatar { width: 40px; height: 40px; font-size: 16px; }
.feed-list { max-width: 920px; margin-top: 18px; }
.journal-page .shared-workout, .entry-page .social-profile .shared-workout { padding: 16px 20px; border-radius: 16px; margin-top: 10px; }
.shared-header { gap: 12px; align-items: flex-start; }
.shared-header .shared-author { display: flex; flex-direction: row; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
.shared-header .shared-identity { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shared-identity strong { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.shared-header time { flex-shrink: 0; font-size: 12px; padding-top: 4px; }
.shared-body { margin-left: 56px; }
.shared-workout h3 { font-size: 16px; margin: 8px 0 4px; line-height: 1.4; }
.shared-workout h3 > span { font-size: 14px; }
.shared-workout .public-caption { margin: 4px 0; font-size: 15px; line-height: 1.45; }
.shared-workout .reaction-row { padding-top: 4px; min-height: 36px; gap: 12px; }
.reaction-row .text-button { min-height: 36px; padding: 6px 0; font-size: 13px; }
.caption-details { margin: 4px 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.caption-details summary { cursor: pointer; list-style: none; }
.caption-details summary::-webkit-details-marker { display: none; }
.caption-details summary > span { color: #9f302b; font-size: 13px; white-space: nowrap; }
.caption-details[open] summary { font-size: 0; }
.caption-details[open] summary > span { display: none; }
.caption-details[open] summary::after { content: '−'; font-size: 18px; }
.friend-chip { border-radius: 16px; }
.journal-page .person-card { border-radius: 16px; }
@media (max-width: 600px) {
  .journal-page .shared-workout, .entry-page .social-profile .shared-workout { padding: 14px; border-radius: 14px; }
  .shared-header .shared-author { gap: 9px; }
  .shared-header .user-avatar { width: 36px; height: 36px; font-size: 16px; }
  .shared-header time { font-size: 11px; }
  .shared-identity strong { font-size: 14px; }
  .shared-body { margin-left: 0; }
  .shared-workout h3 { margin-top: 10px; }
  .reaction-row .text-button { min-height: 44px; }
}

.shared-header .user-avatar { color: #fff; font-size: 18px; }
.field[hidden] { display: none; }
.avatar-current { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.avatar-current label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.avatar-current input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; }
@media (max-width: 600px) { .shared-header .user-avatar { font-size: 16px; } }

.journal-page .post-composer { padding: 14px 20px; border-radius: 16px; margin-bottom: 16px; }
.composer-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; min-height: 44px; color: var(--muted); }
.composer-toggle::-webkit-details-marker { display: none; }
.composer-toggle > span:last-child { margin-left: auto; color: var(--brand-red); font-size: 25px; }
.composer-form { margin-top: 16px; }
.composer-form .field { width: 100%; }
.composer-form textarea { width: 100%; min-height: 110px; }
.post-audience { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 12px 0; }
.composer-actions { display: flex; justify-content: flex-end; }
.post-edit-link { margin-left: auto; font-size: 13px; min-height: 36px; display: inline-flex; align-items: center; }
@media (max-width: 600px) { .journal-page .post-composer { padding: 12px 14px; } .composer-actions .button { width: 100%; } .post-edit-link { min-height: 44px; } }

.journal-page nav .feed-nav-link { border-left: 3px solid var(--brand-red); background: #ffffff08; }
.journal-page nav .feed-nav-link.active { background: var(--brand-red); color: #111; }

.user-avatar.profile-avatar { width: 96px; height: 96px; font-size: 36px; }
.user-avatar.logged-in-avatar { width: 48px; height: 48px; font-size: 20px; }
.publication-image-link { display: block; margin: 14px 0; border-radius: 14px; overflow: hidden; background: #f3f3f1; }
.publication-image { display: block; width: 100%; max-height: 560px; object-fit: contain; }
.publication-photo-tools { display: grid; gap: 10px; }
.publication-photo-tools[hidden], .publication-preview[hidden] { display: none; }
.publication-preview { display: block; max-width: 100%; width: 240px; max-height: 240px; object-fit: contain; border-radius: 12px; }
.photo-replacement-dialog { max-width: min(440px, calc(100vw - 32px)); border: 1px solid #ddd; border-radius: 18px; padding: 24px; color: #202020; }
.photo-replacement-dialog::backdrop { background: #0008; }
.photo-replacement-dialog p { line-height: 1.6; margin: 16px 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 600px) { .user-avatar.profile-avatar { width: 84px; height: 84px; } .publication-image { max-height: 420px; } .dialog-actions .button { flex: 1 1 auto; } }

.field[hidden] { display: none !important; }

.publication-file-control { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.publication-file-control [data-photo-filename] { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.publication-file-input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; clip-path: inset(50%); }
.publication-file-control:focus-within > label { outline: 3px solid #dc7474; outline-offset: 3px; }
