/* Home, feed and account layout ownership. */
.home-deals,
.home-campus-access,
.home-question-season {
  margin-top: 28px;
}
.home-deal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.home-campus-access > .button {
  margin: 8px 10px 0 0;
}
.home-question-season {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: 22px;
  background: var(--mode-soft, #ebe5f6);
}
.home-question-season > div {
  flex: 1;
}
.home-question-season h2 {
  font-size: 20px;
  margin: 0;
}
.home-question-season p {
  margin: 8px 0 0;
}
.home-dashboard .home-welcome h1 {
  font-size: clamp(27px, 5vw, 40px);
}
.me-page {
  max-width: 640px;
  margin: auto;
}
.me-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 0 16px;
}
.me-page-actions > .button {
  margin-right: auto;
}
.me-page .profile-showcase {
  width: 100%;
  max-width: none;
}
.account-settings,
.trust-page {
  max-width: 740px;
  margin: auto;
}
.account-page-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
}
.account-page-heading h1 {
  font-size: 30px;
  margin: 0;
}
.settings-category {
  border-bottom: 1px solid var(--mode-line, #ded8e4);
  padding: 10px 0;
}
.settings-category-toggle,
.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  background: none;
  color: var(--mode-text, #211a36);
  padding: 18px 12px;
  text-align: left;
  font: inherit;
}
.settings-category-toggle {
  justify-content: space-between;
}
.settings-category-toggle h2 {
  margin: 0;
  font-size: 19px;
}
.settings-row > span {
  flex: 1;
}
.settings-row > svg:last-child:not(:first-child) {
  margin-left: auto;
}
.settings-row[aria-pressed="true"] {
  color: #6236ff;
}
.trust-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.trust-history {
  padding: 20px 0;
}
.trust-history-item {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--mode-line, #ded8e4);
  padding: 20px 0;
}
.trust-history-item > svg {
  flex: 0 0 20px;
}
.trust-history-item strong,
.trust-history-item small {
  display: block;
}
.trust-history-item small {
  margin-top: 8px;
  color: var(--mode-muted, #6c657a);
}
.trust-history-item p {
  line-height: 1.6;
}
.friendship-settings .field {
  margin: 18px 0;
}
.friend-confirm {
  padding: 16px;
  margin-top: 18px;
  background: var(--mode-soft, #ebe5f6);
  border-radius: 16px;
}
.friend-confirm .button {
  margin-right: 10px;
}
.friend-management-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--mode-line, #ded8e4);
}
.friend-profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
}
.friend-profile-link > .stu-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.friend-profile-link > span:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
.friendship-profile-button {
  margin: 16px 20px;
}
.profile-page-backdrop .profile-entire-card.modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  height: 100dvh;
  max-height: 100dvh;
  padding-bottom: 0;
}
.profile-page-backdrop .modal-content {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0 0
    max(24px, var(--native-inset-bottom, env(safe-area-inset-bottom, 0px)));
}
.profile-page-backdrop .modal-content > .profile-showcase {
  flex-shrink: 0;
}
.profile-page-backdrop .profile-icon-actions,
.profile-page-backdrop .profile-safety-actions {
  position: static !important;
  inset: auto;
  transform: none;
  order: initial;
  z-index: auto;
}
.profile-page-backdrop .profile-icon-actions {
  padding-bottom: 18px;
}
.little-moments-profile .moments-course {
  color: #211a36;
  background: #fffaf1ec;
  border-radius: 12px;
  padding: 8px 12px;
  opacity: 1;
  font-size: 14px;
}
.little-moments-profile .lm-details strong {
  color: var(--mode-text, #211a36);
  opacity: 1;
}
.little-moments-profile .lm-details > div {
  font-size: 13px;
}
.little-moments-profile .lm-details > div > span {
  color: var(--mode-muted, #6c657a);
}
.social-surface {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  margin: 0 auto;
  --purple: #6236ff;
}
.social-surface .feed-top {
  padding: 8px 20px 16px;
  gap: 10px;
  min-height: 60px;
}
.social-surface .feed-top h3 {
  font-size: 26px;
  line-height: 1.2;
}
.social-surface .feed-top button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  flex-shrink: 0;
}
.social-surface .feed-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  margin: 0;
  padding: 0 20px 10px;
  border-bottom: 1px solid var(--mode-line, #ded8e4);
  overflow-x: auto;
}
.social-surface .feed-tabs button {
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 10px 0;
}
.social-surface .compose {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--mode-line, #ded8e4);
  border-radius: 0;
  margin: 0;
  padding: 20px;
  width: 100%;
  font-size: 15px;
  color: var(--mode-muted, #6c657a);
}
.social-surface .post {
  display: block;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 22px 20px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--mode-line, #ded8e4);
}
.social-surface .post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  position: static;
  padding: 0;
  margin: 0;
}
.social-surface .post-head .author-button {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  width: auto;
  text-align: left;
}
.social-surface .author-button > div:last-child {
  min-width: 0;
}
.social-surface .post-head strong {
  font-size: 15px;
  line-height: 1.35;
  display: block;
  overflow-wrap: anywhere;
}
.social-surface .post-head small {
  display: block;
  font-size: 11px;
  color: var(--mode-muted, #6c657a);
  line-height: 1.5;
  margin-top: 4px;
}
.social-surface .post-head .post-menu {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  margin: 0;
}
.social-surface .tiny-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 50%;
}
.social-surface .tiny-avatar .stu-avatar {
  width: 100%;
  height: 100%;
  display: block;
}
.social-surface .post > p,
.social-surface .post .markdown-text,
.social-surface .post .markdown-text p {
  font-size: 15px;
  line-height: 1.6;
}
.social-surface .post > p {
  margin: 16px 0;
}
.social-surface .audience {
  display: inline-block;
  margin: 6px 0 0 7px;
  vertical-align: middle;
  font-size: 10px;
}
.social-surface .post-photo {
  height: auto;
  max-height: 440px;
  aspect-ratio: 4/3;
  border-radius: 16px;
}
.social-surface .post-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0;
  margin-top: 16px;
}
.social-surface .post-actions button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  min-height: 32px;
  color: inherit;
}
.social-surface .post-actions svg {
  width: 20px;
  height: 20px;
}
.social-surface .post-options {
  background: var(--mode-soft, #ebe5f6);
  padding: 12px;
  border-radius: 12px;
}
.social-surface .social-replies article {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--mode-line, #ded8e4);
}
.social-surface .social-replies p {
  font-size: 14px;
  line-height: 1.5;
}
.social-surface .social-compose textarea,
.social-surface .social-reply-box textarea {
  color: var(--mode-text, #211a36);
  background: var(--mode-surface, #fffaf1);
  border: 1px solid var(--mode-line, #ded8e4);
  border-radius: 14px;
  padding: 14px;
  width: 100%;
  font: inherit;
}
.social-surface .post-photo img {
  display: block;
  object-fit: cover;
  height: 100%;
  width: 100%;
}
/* One compact, circular avatar treatment throughout conversations. */
.messenger .chat-avatar,
.messenger .message-avatar {
  border-radius: 50%;
  aspect-ratio: 1;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
  display: block;
}
.messenger .chat-avatar .stu-avatar,
.messenger .message-avatar .stu-avatar {
  display: block;
  width: 100%;
  height: 100%;
}
.messenger .chat-avatar .profile-portrait,
.messenger .message-avatar .profile-portrait {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: none;
  box-shadow: none;
  background: none;
}
.messenger .chat-avatar .portrait-inner,
.messenger .message-avatar .portrait-inner {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: none;
}
.messenger .chat-avatar .portrait-inner img,
.messenger .message-avatar .portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.messenger .stu-chat-logo {
  object-fit: contain;
  padding: 8px;
  background: #e7ddff;
}
.official-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  background: #e7ddff;
  color: #472593;
  margin: 0 7px;
}
.conversation-name {
  align-items: center;
  gap: 7px;
}
.conversation-name time {
  margin-left: auto;
}
.conversation-name > svg {
  color: #6236ff;
  flex: 0 0 14px;
}
.press-holding {
  animation: hold-feedback 0.45s ease-out forwards;
  will-change: transform;
}
@keyframes hold-feedback {
  to {
    transform: scale(0.97);
    filter: brightness(0.94);
  }
}
.chat-list-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: #211a3640;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.chat-list-menu-sheet {
  width: min(100%, 520px);
  max-height: 80dvh;
  overflow: auto;
  padding: 22px 22px
    calc(
      22px +
        max(var(--native-inset-bottom, 0px), env(safe-area-inset-bottom, 0px))
    );
  border-radius: 24px 24px 0 0;
  background: var(--mode-surface, #fffaf1);
  color: var(--mode-text, #211a36);
  box-shadow: 0 -10px 40px #211a3615;
}
.chat-list-menu-sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.chat-list-menu-sheet h3 {
  margin: 0;
}
.chat-menu-list > button,
.chat-menu-list > div > button {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  font: inherit;
  text-align: left;
  min-height: 48px;
  border: 0;
  background: none;
  color: inherit;
  padding: 12px;
}
.chat-menu-list button svg {
  flex: 0 0 20px;
}
.custom-file-button {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--mode-line, #ded8e4);
  border-radius: 13px;
  padding: 14px;
  margin: 18px 0;
  position: relative;
  cursor: pointer;
  color: inherit;
}
.custom-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.checkbox-row input[type="checkbox"] {
  width: 20px !important;
  height: 20px;
  min-width: 20px;
  accent-color: #6236ff;
  appearance: auto;
}
.chat-style-tabs {
  margin-bottom: 18px;
}
.chat-style-preview {
  position: relative;
  padding: 44px 16px 22px;
  min-height: 170px;
  border-radius: 16px;
  margin: 16px 0;
  border: 1px solid var(--mode-line, #ded8e4);
  background-color: var(--mode-soft, #eee8f5);
}
.preview-label {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 11px;
  color: var(--mode-muted, #6c657a);
}
.preview-other,
.preview-mine {
  width: fit-content;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.4;
  color: #211a36;
  background: #fffaf1;
}
.preview-mine {
  margin: 12px 0 0 auto;
  position: relative;
}
.preview-mine.shape-square {
  border-radius: 6px;
}
.preview-mine.shape-rounded {
  border-radius: 22px;
}
.preview-mine.detail-outline {
  border: 2px solid #71509d;
}
.preview-mine.detail-doodle {
  border: 2px dashed #71509d;
}
.preview-spark {
  position: absolute;
  right: -5px;
  top: -12px;
  color: #6236ff;
}
.style-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.style-options button {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--mode-surface, #fffaf1);
  border: 1px solid var(--mode-line, #ded8e4);
  color: inherit;
  font: inherit;
  font-size: 13px;
}
.style-options button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px #6236ff;
  border-color: #6236ff;
}
.chat-personalisation > .button {
  margin: 18px 8px 0 0;
}
.shared-profile-card {
  max-width: 270px;
  border-radius: 19px;
  overflow: hidden;
  box-shadow: none;
}
.shared-profile-card .shared-profile-hero {
  min-height: 130px;
  display: flex;
  align-items: center;
  padding: 20px;
}
.shared-profile-card .shared-profile-hero .stu-avatar {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
}
.shared-profile-card .profile-share-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.shared-profile-card > span > strong {
  font-size: 24px;
}
@media (max-width: 760px) {
  .app-shell .mobile-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .mobile-nav button {
    min-width: 0;
    padding: 8px 2px;
  }
  .mobile-nav button span {
    font-size: 10px;
  }
  .home-deal-grid {
    grid-template-columns: 1fr;
  }
  .home-question-season {
    flex-wrap: wrap;
  }
  .home-question-season > button {
    width: 100%;
  }
  .me-page-actions {
    padding: 0 4px 12px;
  }
  .me-page .profile-showcase {
    border-radius: 0;
  }
  .home-welcome .home-campus {
    max-width: 100%;
  }
  .social-surface {
    margin: 0;
    width: 100%;
    max-width: none;
  }
  .social-surface .feed-top {
    padding-top: 8px;
  }
  .account-settings {
    padding-bottom: 20px;
  }
  .chat-list-menu-sheet {
    padding-top: 20px;
  }
  .chat-sheet .chat-menu-list {
    padding-bottom: 10px;
  }
  .profile-page-backdrop {
    z-index: 160;
  }
}
@media (prefers-reduced-motion: reduce) {
  .press-holding {
    animation: none;
    filter: brightness(0.94);
  }
}

.chat-style-preview .preview-mine {
  border: 1px solid #211a3618;
  box-shadow: 0 2px 4px #211a3608;
  color: #211a36;
}
.chat-style-preview .preview-other {
  color: #211a36;
}
