/* Home composer. Keep one writing surface and a quiet, single-row toolbar. */
body.product-active .home-page #post-form {
  padding: 20px 22px 12px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}
body.product-active .home-page #post-form .composer-author {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
body.product-active .home-page #post-form .composer-author .avatar {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
body.product-active .home-page #post-form .composer-identity { min-width: 0; }
body.product-active .home-page #post-form .composer-identity > strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.product-active .home-page #post-form .composer-audience {
  display: block;
  margin: 0;
  font-size: 0;
  line-height: 1;
}
body.product-active .home-page #post-form .composer-audience select {
  width: auto;
  max-width: 100%;
  min-height: 28px;
  margin-left: -4px;
  padding: 3px 22px 3px 4px;
  border: 0;
  border-radius: 5px;
  background-color: transparent;
  background-position: right 4px center;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
}
body.product-active .home-page #post-form .composer-top {
  display: block;
  margin: 16px 0 0;
}
body.product-active .home-page #post-form .mention-compose { min-width: 0; }
body.product-active .home-page #post-form #post-body {
  display: block;
  width: 100%;
  height: 88px;
  min-height: 88px;
  max-height: 400px;
  margin: 0;
  padding: 2px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1.6 'DM Sans', sans-serif;
  resize: vertical;
}
body.product-active .home-page #post-form #post-body::placeholder { color: var(--muted); opacity: .85; }
body.product-active .home-page #post-form #post-body:focus {
  border-color: transparent;
  box-shadow: none;
  outline: none;
}
body.product-active .home-page #post-form .composer-top:focus-within {
  box-shadow: 0 2px 0 var(--brand);
}
body.product-active .home-page #post-form .composer-bottom {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
body.product-active .home-page #post-form .composer-options {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
}
body.product-active .home-page #post-form .composer-media { display: flex; align-items: center; gap: 2px; }
body.product-active .home-page #post-form .post-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}
body.product-active .home-page #post-form .post-image-button .icon { width: 19px; height: 19px; color: var(--brand); }
body.product-active .home-page #post-form .post-image-button:hover,
body.product-active .home-page #post-form .composer-audience select:hover { background-color: var(--brand-soft); color: var(--brand-strong); }
body.product-active .home-page #post-form .composer-topic-picker {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
body.product-active .home-page #post-form .composer-topic-picker .icon { flex: 0 0 16px; width: 16px; height: 16px; color: var(--muted); }
body.product-active .home-page #post-form .composer-topic-picker select {
  width: auto;
  min-width: 0;
  max-width: 150px;
  min-height: 40px;
  padding: 8px 24px 8px 2px;
  border: 0;
  border-radius: 5px;
  background-color: transparent;
  background-position: right 4px center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}
body.product-active .home-page #post-form .post-compose-actions { display: flex; flex: 0 0 auto; width: auto; }
body.product-active .home-page #post-form .post-compose-actions .button.primary {
  flex: 0 0 auto;
  min-width: 84px;
  min-height: 40px;
  padding: 9px 22px;
  border: 0;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  box-shadow: none;
  font-size: 14px;
  line-height: 22px;
  font-weight: 700;
}
body.product-active .home-page #post-form .post-compose-actions .button.primary:hover { background: var(--brand-strong); }
body.product-active .home-page #post-form .post-compose-actions .button.primary:disabled { opacity: .6; cursor: wait; }
body.product-active .home-page #post-form :is(button,select):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
body.product-active .home-page #post-form .post-image-preview { margin: 12px 0; }

@media (max-width: 780px) {
  /* Restore the opener immediately when the fullscreen composer closes. */
  body.product-active .mobile-nav,
  body.product-active .mobile-nav * { transition-property: none; }
  body.product-active.mobile-composer-open .home-page #post-form { gap: 0; padding: max(12px,env(safe-area-inset-top)) 20px max(12px,env(safe-area-inset-bottom)); }
  body.product-active.mobile-composer-open .home-page #post-form .mobile-compose-heading { flex-shrink: 0; margin: 0 -4px 22px 0; font-size: 16px; }
  body.product-active.mobile-composer-open .home-page #post-form .mobile-composer-close { background: transparent; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-author { flex-shrink: 0; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-audience select { min-height: 44px; font-size: 16px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-top { flex: 1 0 auto; margin-top: 20px; }
  body.product-active.mobile-composer-open .home-page #post-form #post-body { min-height: 160px; height: 35dvh; font-size: 18px; resize: none; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-top:focus-within { box-shadow: none; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-bottom { flex-shrink: 0; flex-direction: row; align-items: center; margin-top: 16px; gap: 8px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-options { flex: 1 1 auto; gap: 4px 8px; }
  body.product-active.mobile-composer-open .home-page #post-form .post-image-button { width: 44px; min-height: 44px; padding: 10px; }
  body.product-active.mobile-composer-open .home-page #post-form .post-image-button span { display: none; }
  body.product-active.mobile-composer-open .home-page #post-form .post-image-button .icon { width: 22px; height: 22px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-topic-picker { padding-left: 8px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-topic-picker .icon { display: none; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-topic-picker select { max-width: 112px; min-height: 44px; font-size: 16px; }
  body.product-active.mobile-composer-open .home-page #post-form .post-compose-actions { flex: 0 0 auto; width: auto; }
  body.product-active.mobile-composer-open .home-page #post-form .post-compose-actions .button.primary { min-width: 72px; min-height: 44px; padding: 10px 16px; }
}
@media (max-width: 360px) {
  body.product-active.mobile-composer-open .home-page #post-form { padding-inline: 16px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-options { gap: 4px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-topic-picker { padding-left: 4px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-topic-picker select { width: 104px; max-width: 104px; }
}
@media (max-width: 780px) and (max-height: 500px) {
  body.product-active.mobile-composer-open .home-page #post-form .mobile-compose-heading { margin-bottom: 8px; }
  body.product-active.mobile-composer-open .home-page #post-form .composer-top { margin-top: 10px; }
  body.product-active.mobile-composer-open .home-page #post-form #post-body { min-height: 80px; height: 80px; }
}
