/* Keep the private identity copy on the same readable, outlined glass
   language as the supporting profile cards. The extra top margin clears the
   avatar overlap without adding another layout wrapper. */
body.profile-page .profile-identity-card > .profile-identity > .profile-identity-copy {
  margin-block-start: calc(var(--profile-avatar-size, 161px) * .6 + 10px) !important;
  background: rgba(255, 253, 249, .72) !important;
  border: 1px solid rgba(10, 28, 37, .14) !important;
  border-radius: 14px !important;
  box-shadow: 0 14px 30px rgba(10, 28, 37, .1), inset 0 1px 0 rgba(255, 255, 255, .5) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.04) !important;
  backdrop-filter: blur(16px) saturate(1.04) !important;
}

/* profile-details-box was only a visual wrapper. The view and form are now
   direct children of the identity card, preserving their contents without
   introducing another background or gutter. */
body.profile-page .profile-identity-card > .profile-details-view,
body.profile-page .profile-identity-card > .profile-details-form {
  display: block;
  width: min(var(--profile-content-max-width, 1120px), calc(100% - 32px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
  box-sizing: border-box;
}

body.profile-page .profile-identity-card > .profile-details-view {
  margin-block-start: 14px !important;
}

body.profile-page .profile-identity-card > .profile-details-form {
  margin-block-start: 14px !important;
  padding-block-end: 18px !important;
}

/* The journey belongs to the same desktop content rail as the identity and
   other profile cards; do not leave an asymmetric inset on its left edge. */
@media (min-width: 701px) {
  body.profile-page #profileContent > #profileCoffeeJourney {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }
}

@media (max-width: 700px) {
  body.profile-page .profile-identity-card > .profile-identity > .profile-identity-copy {
    margin-block-start: calc(var(--profile-avatar-size, 104px) * .6 + 6px) !important;
    border-radius: 12px !important;
  }

  body.profile-page .profile-identity-card > .profile-details-view,
  body.profile-page .profile-identity-card > .profile-details-form {
    width: calc(100% - 16px) !important;
  }

  body.profile-page .profile-identity-card > .profile-details-view {
    margin-block-start: 10px !important;
  }

  body.profile-page .profile-identity-card > .profile-details-form {
    margin-block-start: 10px !important;
    padding-block-end: 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.profile-page .profile-identity-card > .profile-identity > .profile-identity-copy {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
