/* Profile screens share one shell, with persistent app navigation. */
.profile-page-backdrop {
  z-index: 40 !important;
  background: var(--mode-bg, #f8f6f0);
  bottom: 0;
}
.profile-page-backdrop .profile-entire-card.modal {
  height: 100dvh !important;
  max-height: 100dvh !important;
  box-shadow: none;
  border: 0;
}
.profile-page-backdrop .modal-heading {
  left: 16px;
  right: auto;
  top: calc(14px + var(--native-inset-top, env(safe-area-inset-top, 0px)));
  z-index: 8;
}
.profile-page-backdrop .modal-heading button {
  width: 42px;
  height: 42px;
  background: var(--mode-surface, #fffaf1e8);
  color: var(--mode-text, #302438);
  backdrop-filter: blur(10px);
}
.profile-page-backdrop .modal-content {
  height: auto;
  padding-bottom: 110px !important;
}
.profile-page-backdrop .profile-icon-actions {
  position: fixed !important;
  top: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(100%, 640px);
  box-sizing: border-box;
  margin: 0;
  border-top: 1px solid var(--mode-line, #e4e0d9);
  padding: 12px 18px !important;
  z-index: 7;
  background: var(--mode-surface, #fffaf1f2);
  backdrop-filter: blur(16px);
}
.profile-page-backdrop .profile-safety-actions {
  position: static !important;
  margin: 0 0 15px;
}
.me-environment .topbar,
.feed-environment .topbar {
  display: none !important;
}
.profile-page-backdrop .me-page {
  padding: 0;
  margin: 0;
}
.profile-page-backdrop .me-page-actions {
  position: absolute;
  top: calc(14px + var(--native-inset-top, env(safe-area-inset-top, 0px)));
  right: 16px;
  z-index: 8;
  padding: 0;
  margin: 0;
  gap: 7px;
}
.profile-page-backdrop .me-page-actions button {
  height: 42px;
  min-height: 42px;
  background: var(--mode-surface, #fffaf1e8);
  color: var(--mode-text, #302438);
  backdrop-filter: blur(10px);
}
.moments-gallery-controls {
  justify-content: center;
  touch-action: pan-y;
}
.moments-header {
  touch-action: pan-y;
}
.moments-dots button {
  min-height: 24px;
  position: relative;
  background: transparent !important;
  width: 22px !important;
  padding: 0 !important;
}
.moments-dots button::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 8px;
  background: var(--moments-ink, #302438);
  opacity: 0.25;
  top: 9px;
  left: 8px;
}
.moments-dots button[aria-pressed="true"]::after {
  opacity: 1;
  width: 16px;
  left: 3px;
}
/* Feed header replaces the brand bar, matching the independent Chats environment. */
.feed-environment .content {
  padding-top: 0;
}
.feed-environment .social-surface {
  background: transparent !important;
  border: 0;
  box-shadow: none;
  max-width: 720px;
  margin: 0 auto;
  color: var(--mode-text, #211a36);
}
.social-surface .feed-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 0 8px;
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--mode-bg, #f8f6f0);
}
.social-surface .feed-page-header .feed-tabs {
  padding: 0;
  margin: 0;
  gap: 18px;
  border: 0;
  flex: 1;
  min-width: 0;
  overflow: auto;
  scrollbar-width: none;
  align-items: center;
}
.social-surface .feed-page-header .feed-tabs button {
  font-size: 21px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.7px;
  padding: 12px 0;
  white-space: nowrap;
  color: var(--mode-muted, #797383);
  border: 0;
}
.social-surface .feed-page-header .feed-tabs button.active {
  color: var(--mode-text, #211a36);
  position: relative;
}
.social-surface .feed-page-header .feed-tabs button.active::after {
  content: "";
  height: 3px;
  width: 22px;
  background: var(--purple, #6734ef);
  position: absolute;
  bottom: 3px;
  left: calc(50% - 11px);
  border-radius: 9px;
}
.feed-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.social-surface .social-own-avatar {
  margin: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
}
.feed-new-post {
  border: 0;
  background: var(--mode-soft, #e9e1fa);
  color: var(--mode-text, #211a36);
  border-radius: 17px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
}
.social-surface .compose {
  background: transparent;
  margin: 14px 0 6px;
  padding: 10px 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  color: var(--mode-muted, #6c657a);
}
.social-surface .post {
  background: transparent !important;
  border-radius: 0;
  padding: 22px 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--mode-line, #ded8e4);
  overflow: visible;
  box-shadow: none;
}
.social-surface .post-head {
  position: relative;
}
.post-action-anchor {
  position: relative;
  margin-left: auto;
  flex: 0 0 36px;
}
.social-surface .post-action-anchor .post-menu {
  width: 36px;
  height: 36px;
  margin: 0;
}
.social-surface .post-action-menu {
  top: 42px;
  right: 0;
  min-width: 190px;
  max-width: calc(100vw - 36px);
  padding: 6px;
  background: var(--mode-surface, #fffaf1);
  color: var(--mode-text, #211a36);
  border: 1px solid var(--mode-line, #ded8e4);
  border-radius: 16px;
  box-shadow: 0 10px 30px #211a3615;
  z-index: 18;
}
.social-surface .post-action-menu button {
  width: 100%;
  text-align: left;
  font-size: 14px;
  gap: 12px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
  display: flex;
  align-items: center;
  padding: 10px 12px;
}
.social-surface .post-action-menu button:hover {
  background: var(--mode-soft, #eee7fa);
}
.social-surface .tiny-avatar,
.social-surface .social-own-avatar,
.feed-composer-author > .stu-avatar,
.feed-comment-row > .stu-avatar,
.feed-comment-composer > .stu-avatar {
  aspect-ratio: 1;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.social-surface .tiny-avatar .stu-avatar,
.social-surface .social-own-avatar .stu-avatar {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.social-surface .tiny-avatar .profile-portrait,
.social-surface .social-own-avatar .profile-portrait,
.feed-panel .stu-avatar .profile-portrait {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
  border-radius: 50% !important;
  position: relative;
  box-sizing: border-box;
}
.social-surface .tiny-avatar .portrait-inner,
.social-surface .social-own-avatar .portrait-inner,
.feed-panel .stu-avatar .portrait-inner {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  inset: 0 !important;
  position: absolute !important;
  border-radius: 50% !important;
  overflow: hidden;
  padding: 0 !important;
  display: block;
}
.social-surface .tiny-avatar .portrait-inner > svg,
.social-surface .social-own-avatar .portrait-inner > svg,
.feed-panel .portrait-inner > svg {
  height: 100% !important;
  width: 100% !important;
  display: block;
  transform: none !important;
}
.feed-panel .portrait-inner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Focused post composition and comments, sharing the app's sheet language. */
.feed-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: #211a3655;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(5px);
}
.feed-panel {
  height: min(78dvh, var(--feed-panel-height, 78dvh));
  width: min(100%, 640px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--mode-surface, #fffaf1);
  color: var(--mode-text, #211a36);
  border-radius: 26px 26px 0 0;
  overflow: hidden;
  box-shadow: 0 -10px 60px #211a3615;
  outline: none;
}
.feed-panel-full {
  height: var(--feed-panel-height, 100dvh);
  border-radius: 0;
}
.feed-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--mode-line, #e5dfeb);
  flex-shrink: 0;
}
.feed-panel-full .feed-panel-header {
  padding-top: calc(
    16px + var(--native-inset-top, env(safe-area-inset-top, 0px))
  );
}
.feed-panel-header h2 {
  font-size: 21px;
  letter-spacing: -0.6px;
  margin: 0;
}
.feed-panel-header button {
  height: 40px;
  width: 40px;
  padding: 8px;
  border: 0;
  color: inherit;
  background: transparent;
}
.feed-composer-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.feed-composer-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 10px;
  flex-shrink: 0;
}
.feed-composer-author > .stu-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.feed-composer-author strong {
  font-size: 15px;
}
.feed-audience-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: var(--mode-soft, #eee7fa);
  color: inherit;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 5px;
}
.feed-audience-picker {
  border: 0;
  padding: 8px 22px;
  display: grid;
  gap: 5px;
  margin: 0;
}
.feed-audience-picker legend {
  font-size: 12px;
  color: var(--mode-muted, #6c657a);
}
.feed-audience-picker button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: 0;
  border-radius: 12px;
  color: inherit;
  text-align: left;
  padding: 8px 10px;
}
.feed-audience-picker button[aria-pressed="true"] {
  background: var(--mode-soft, #eee7fa);
}
.feed-audience-picker small {
  display: block;
  color: var(--mode-muted, #6c657a);
  font-size: 11px;
  margin-top: 3px;
}
.feed-composer-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 22px 20px;
}
.feed-composer-content textarea {
  width: 100%;
  min-height: 170px;
  background: transparent;
  border: 0;
  padding: 8px 0;
  resize: none;
  color: inherit;
  font: inherit;
  font-size: 21px;
  line-height: 1.5;
  box-sizing: border-box;
  outline: none;
}
.feed-composer-content textarea::placeholder {
  color: var(--mode-muted, #827b8e);
}
.feed-image-preview {
  margin: 10px 0;
  position: relative;
}
.feed-image-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 18px;
  background: var(--mode-soft, #eee7fa);
}
.feed-image-preview button {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #211a36dd;
  color: white;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.feed-composer-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px
    max(15px, var(--native-inset-bottom, env(safe-area-inset-bottom, 0px)));
  border-top: 1px solid var(--mode-line, #e5dfeb);
  flex-shrink: 0;
}
.feed-photo-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--purple, #6734ef);
  font-size: 14px;
  cursor: pointer;
}
.feed-photo-picker input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
}
.feed-photo-picker:focus-within {
  outline: 2px solid var(--purple, #6734ef);
  outline-offset: 4px;
  border-radius: 5px;
}
.feed-composer-footer small {
  font-size: 11px;
  color: var(--mode-muted, #827b8e);
  margin-left: auto;
}
.feed-composer-footer button {
  gap: 8px;
  padding: 12px 18px;
  min-height: 44px;
}
.feed-comment-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px;
  overscroll-behavior: contain;
}
.feed-comment-original {
  border-bottom: 1px solid var(--mode-line, #e5dfeb);
  padding-bottom: 16px;
  margin-bottom: 18px;
  font-size: 14px;
}
.feed-comment-original p {
  margin: 7px 0;
}
.feed-comment-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0;
}
.feed-comment-row > .stu-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.feed-comment-row > div {
  flex: 1;
  min-width: 0;
}
.feed-comment-row header {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.feed-comment-row strong {
  font-size: 14px;
}
.feed-comment-row time {
  font-size: 10px;
  color: var(--mode-muted, #827b8e);
}
.feed-comment-row p {
  font-size: 14px;
  line-height: 1.6;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.feed-comment-empty {
  text-align: center;
  padding: 35px 12px;
}
.feed-comment-empty h3 {
  font-size: 18px;
}
.feed-comment-empty p {
  font-size: 13px;
  color: var(--mode-muted, #827b8e);
}
.feed-comment-composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 14px 18px
    max(14px, var(--native-inset-bottom, env(safe-area-inset-bottom, 0px)));
  border-top: 1px solid var(--mode-line, #e5dfeb);
  flex-shrink: 0;
}
.feed-comment-composer > .stu-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.feed-comment-composer textarea {
  background: var(--mode-soft, #eee7fa);
  color: inherit;
  border: 0;
  border-radius: 18px;
  padding: 10px 14px;
  min-height: 40px;
  max-height: 110px;
  resize: none;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
}
.feed-comment-composer button {
  width: 40px;
  height: 40px;
  padding: 8px;
  background: var(--purple, #6734ef);
  color: white;
  border-radius: 50%;
  border: 0;
}
@media (max-width: 760px) {
  .profile-page-backdrop {
    bottom: calc(
      64px +
        max(env(safe-area-inset-bottom, 0px), var(--native-inset-bottom, 0px))
    ) !important;
  }
  .profile-page-backdrop .profile-entire-card.modal {
    height: 100% !important;
    max-height: 100% !important;
  }
  .profile-page-backdrop .profile-icon-actions {
    bottom: calc(
      64px +
        max(env(safe-area-inset-bottom, 0px), var(--native-inset-bottom, 0px))
    ) !important;
  }
  .feed-environment .workspace {
    padding-top: 0 !important;
  }
  .feed-environment .content {
    padding: 0 16px 90px !important;
  }
  .social-surface .feed-page-header {
    padding-top: calc(
      17px + var(--native-inset-top, env(safe-area-inset-top, 0px))
    );
    gap: 10px;
  }
  .social-surface .feed-page-header .feed-tabs {
    gap: 15px;
  }
  .social-surface .feed-page-header .feed-tabs button {
    font-size: 21px;
  }
  .feed-header-actions .social-own-avatar {
    display: none;
  }
  .feed-new-post {
    width: 44px;
    height: 44px;
  }
  .social-surface .post-photo {
    border-radius: 18px;
  }
  .profile-page-backdrop .me-page-actions button {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .feed-panel {
    animation: feed-sheet-in 0.18s ease-out;
  }
  @keyframes feed-sheet-in {
    from {
      transform: translateY(30px);
      opacity: 0.4;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

@media (min-width: 761px) {
  .profile-page-backdrop {
    left: 220px !important;
  }
  .profile-page-backdrop .profile-icon-actions {
    left: calc(50% + 110px) !important;
  }
}
@media (min-width: 1201px) {
  .profile-page-backdrop {
    left: 252px !important;
  }
  .profile-page-backdrop .profile-icon-actions {
    left: calc(50% + 126px) !important;
  }
}

.social-surface .post-head > .post-action-anchor {
  flex: 0 0 36px !important;
  margin-left: auto;
}
.social-surface .post-head > .author-button {
  flex: 1;
  min-width: 0;
}

.profile-page-backdrop {
  backdrop-filter: none !important;
}
.feed-environment main {
  padding-top: 0 !important;
}
@media (max-width: 760px) {
  .feed-environment main {
    padding: 0 16px 90px !important;
  }
}

.feed-report-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 22px;
  flex: 1;
  overflow: auto;
}
.feed-report-form label {
  display: grid;
  gap: 12px;
  font-size: 14px;
}
.feed-report-form p {
  font-size: 13px;
  color: var(--mode-muted, #797383);
}
.feed-report-form textarea {
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--mode-line, #e5dfeb);
  background: var(--mode-soft, #eee7fa);
  color: inherit;
  font: inherit;
  border-radius: 15px;
  resize: vertical;
}
.feed-report-form > .button {
  margin-top: auto;
  margin-bottom: max(
    0px,
    var(--native-inset-bottom, env(safe-area-inset-bottom, 0px))
  );
}

@media(max-width:760px){.feed-header-actions .social-own-avatar{display:block;width:28px;height:28px}.feed-header-actions{gap:8px}.social-surface .feed-page-header .feed-tabs{gap:12px}.social-surface .feed-page-header .feed-tabs button{font-size:20px;max-width:110px;text-overflow:ellipsis;overflow:hidden}}

.feed-environment .workspace>.topbar+main .content-layout{padding-top:0!important}
