/* Feed, account cover and the account-bound checkout. */
.social-screen .client-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

body.client-desktop #clientScreenFeed.active.social-screen {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
  margin-inline: auto;
}

body.client-desktop #clientScreenFeed.social-screen > :is(.social-compose, .social-filter, #clientFeed) { grid-column: 1 / -1; }

.social-screen .social-compose {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.social-compose img,
.social-post-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 750;
  object-fit: cover;
  flex: none;
}

.social-compose .ghost-button {
  width: 100%;
  justify-content: flex-start;
  text-align: start;
  padding-inline: 16px;
  min-height: 48px;
  white-space: normal;
  border-radius: 24px;
  background: var(--surface-2);
}

.social-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-filter button {
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 650;
}

.social-filter button:hover { color: var(--text); }
.social-filter button[aria-pressed="true"] {
  color: var(--text);
  background: color-mix(in srgb, var(--red) 15%, var(--surface));
  border-color: var(--red);
}

.feed .social-post, #clientScreenFeed .feed .social-post {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--fs-radius, 18px);
  background: var(--surface);
  box-shadow: 0 1px 3px #0002;
}

.social-post .social-post-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  margin: 0 0 16px;
}

.social-post-header .social-post-avatar {
  width: 44px;
  height: 44px;
  max-height: none;
  border-radius: 50%;
  margin: 0;
  flex: none;
}

.social-post-header strong,
.social-post-header small { display: block; overflow-wrap: anywhere; }
.social-post-header strong { color: var(--text); font-size: 15px; }
.social-post-header small { color: var(--muted); margin-top: 2px; font-size: 12px; }
.social-post-body h3 { margin: 0 0 5px; line-height: 1.28; font-size: 18px; overflow-wrap: anywhere; }
.social-post-body p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.social-post-media { display: grid; gap: 10px; min-width: 0; margin-top: 14px; }
.social-post-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(60vh, 540px);
  margin-inline: auto;
  object-fit: contain;
  border-radius: 12px;
}

.social-post-media .attachment {
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  text-align: left;
  overflow-wrap: anywhere;
}

.social-post .post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.social-post .post-actions button { gap: 7px; min-height: 44px; background: transparent; }
.social-post .reaction-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  fill: none;
}

.social-post .reaction-button.reacted { color: var(--fs-red-bright, #ff9d8e); }
.social-post .reaction-button.reacted svg { fill: currentColor; }
.social-post .social-delete { margin-inline-start: auto; color: var(--muted); }

.social-thread { margin-top: 6px; }
.social-thread summary {
  width: fit-content;
  max-width: 100%;
  padding: 12px 4px;
  line-height: 20px;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
}

.social-thread .comment {
  margin: 0 0 8px;
  padding: 10px 13px;
  color: var(--text);
  background: var(--surface-2);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.social-thread .comment p { margin: 3px 0 0; white-space: pre-wrap; }
.social-thread .comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0;
}

.social-thread .comment-form :is(input, button) { min-height: 44px; min-width: 0; }

dialog.social-composer-modal {
  width: min(100% - 24px, 560px);
  padding: 0;
}

.social-dialog-inner { display: grid; gap: 16px; padding: clamp(16px, 4vw, 24px); }
.social-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.social-dialog-header h2 { margin: 0; font-size: clamp(21px, 5vw, 26px); }
.social-dialog-header p { color: var(--muted); margin: 4px 0 0; }
.social-dialog-header button { flex: none; }
.social-composer-modal .client-post-form { display: grid; gap: 14px; }
.social-composer-modal .form-error:empty { display: none; }
.social-composer-modal textarea { min-height: 104px; resize: vertical; }

body #clientScreenProfile .social-profile {
  display: grid;
  grid-column: 1 / -1;
  gap: 0;
  padding: 0;
}

.social-profile-cover {
  block-size: clamp(108px, 19vw, 210px);
  border-radius: calc(var(--fs-radius, 18px) - 1px) calc(var(--fs-radius, 18px) - 1px) 0 0;
  background: linear-gradient(90deg, #100b10ae 24%, #21101315), url("/assets/fs-gorilla-cover.webp") 72% 38% / cover;
}

.social-profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 3vw, 22px);
  padding: 16px clamp(14px, 3vw, 26px);
}

.social-profile-identity img {
  width: clamp(56px, 9vw, 92px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}

.social-profile-identity h2 { margin: 0; font-size: clamp(21px, 4vw, 32px); overflow-wrap: anywhere; }
.social-profile-identity p { margin: 4px 0 0; }
.social-profile-identity .photo-upload-button { margin: 0; min-height: 44px; text-align: center; }
.social-profile-identity .photo-upload-button:focus-within { outline: 2px solid var(--red); outline-offset: 3px; }
.social-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px clamp(14px, 3vw, 26px);
}

#clientScreenProfile .social-profile-edit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
#clientScreenProfile .social-profile-edit > .panel-head { margin: 0; }

body.client-desktop #clientScreenProfile.active.client-screen {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas: "cover cover" "edit summary" "edit reminders";
  align-items: start;
}

body.client-desktop #clientScreenProfile.active > .social-profile { grid-area: cover; align-content: start; }
body.client-desktop #clientScreenProfile.active > .social-profile-edit { grid-area: edit; grid-template-columns: minmax(0, 1fr); }
body.client-desktop #clientScreenProfile.active > .social-profile-summary { grid-area: summary; }
body.client-desktop #clientScreenProfile.active > .social-profile-reminders { grid-area: reminders; }

body.billing-open .app-shell,
body.billing-open #authGate { display: none; }

.billing-screen {
  color: var(--text);
  min-height: 100dvh;
  background: var(--bg);
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}

.billing-header,
.billing-main { width: min(100%, 1056px); margin-inline: auto; }
.billing-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.billing-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.billing-brand img { width: 38px; height: 38px; border-radius: 9px; }
.billing-main { display: grid; gap: 18px; padding-block: clamp(26px, 5vw, 60px); }
.billing-heading h1 {
  margin: 6px 0 8px;
  font-size: clamp(29px, 5vw, 57px);
  line-height: 1.08;
  letter-spacing: -.049em;
}
.billing-heading h1:focus { outline: none; }
.billing-heading p, .billing-plan p, .billing-pending p, .billing-summary p { color: var(--muted); margin: 0; }
.billing-status, .billing-error {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.billing-error { color: var(--fs-red-bright, #ff9d8e); }
.billing-form fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.billing-form legend { padding: 0; margin-bottom: 12px; font-weight: 700; }
.billing-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.billing-plan, .billing-pending {
  border: 1px solid var(--line);
  border-radius: var(--fs-radius, 18px);
  background: var(--surface);
  padding: clamp(14px, 3vw, 23px);
}

.billing-plan { display: grid; gap: 17px; align-content: space-between; }
.billing-plan h2, .billing-pending h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.022em; }
.billing-offers { display: grid; gap: 7px; }
.billing-offer {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
}
.billing-offer:has(input:checked) { border-color: var(--red); }
.billing-offer input { width: 17px; height: 17px; margin: 0; accent-color: var(--red); }
.billing-offer strong { white-space: nowrap; }
.billing-summary, .billing-pending {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
}
.billing-summary { margin-top: 16px; }
.billing-pending-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.billing-pending a { text-decoration: none; }
.billing-pending a[hidden], .billing-pending[hidden] { display: none; }

@media (max-width: 780px) {
  .billing-plans { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 460px) {
  .social-profile-identity { grid-template-columns: auto minmax(0, 1fr); }
  .social-profile-identity .photo-upload-button { grid-column: 2; justify-self: start; }
  .billing-pending-actions { flex-direction: column; width: 100%; }
  .billing-pending-actions :is(a, button) { justify-content: center; }
}

@media (max-width: 400px) {
  .social-filter { gap: 6px; }
  .social-filter button { padding-inline: 10px; }
}
