/* Full-height profile characters. The existing picker mechanics stay intact; only its visual source and hero composition change. */

@media (min-width: 761px) {
  #profileModal .profile-cover-card {
    position: relative;
    isolation: isolate;
    min-height: 342px !important;
    padding: 0 !important;
    overflow: visible !important;
    border-radius: 24px !important;
  }

  #profileModal .profile-cover-card .profile-cover {
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 24px !important;
    background-position: center !important;
    background-size: cover !important;
  }

  #profileModal .profile-cover-card .profile-cover::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.18) 45%, rgba(255,255,255,.42) 100%);
    pointer-events: none;
  }

  #profileModal .profile-cover-card .profile-cover::after,
  #profileModal .profile-cover-card .profile-cover > img {
    display: none !important;
  }

  #profileModal .profile-cover-card .cover-edit {
    top: 16px;
    right: 16px;
    bottom: auto;
    z-index: 30;
  }

  #profileModal .profile-cover-card .avatar-picker-current {
    position: absolute !important;
    z-index: 20;
    top: 34px;
    bottom: 12px;
    left: 18px;
    width: calc(36% - 18px) !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #profileModal .profile-cover-card .avatar-picker-current > img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    filter: drop-shadow(0 18px 15px rgba(15,19,30,.22));
  }

  #profileModal .profile-cover-card .avatar-edit {
    right: 0;
    bottom: 0;
    z-index: 24;
  }

  #profileModal .profile-cover-card .avatar-picker-popover {
    left: 18px !important;
    bottom: 12px !important;
    z-index: 25;
  }

  #profileModal .profile-cover-card .profile-summary-card {
    position: relative;
    z-index: 10;
    min-height: 342px;
    margin: 0 14px 0 37%;
    padding: 34px 22px 18px !important;
    display: flex !important;
    flex-direction: column;
    gap: 14px !important;
    border-radius: 22px !important;
    background: rgba(255,255,255,.86) !important;
    box-shadow: 0 16px 36px rgba(15,20,32,.12) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  #profileModal .profile-summary-card .profile-name-line {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    align-items: start !important;
    gap: 10px !important;
  }

  #profileModal .profile-summary-card .profile-identity-copy {
    gap: 5px;
  }

  #profileModal .profile-summary-card h2 {
    font-size: clamp(24px, 3vw, 32px) !important;
    line-height: 1.04 !important;
  }

  #profileModal .profile-summary-card .achievement-rail {
    max-width: 100% !important;
    min-height: 36px;
    margin: 0 !important;
    padding: 2px 0 !important;
  }

  #profileModal .profile-summary-card .profile-details-row {
    margin-top: auto;
    grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
    padding-top: 14px;
  }

  #profileModal .profile-summary-card .profile-usage span,
  #profileModal .profile-summary-card .profile-email {
    min-height: 58px !important;
    padding: 7px 8px !important;
  }
}

@media (max-width: 760px) {
  #mobileProfileContent .m-profile-hero,
  #mobileProfileContent.is-editing .m-profile-hero {
    position: relative !important;
    isolation: isolate;
    display: block !important;
    min-height: 310px !important;
    height: 310px !important;
    overflow: hidden !important;
    border-radius: 24px !important;
    background: var(--m-tile) !important;
  }

  #mobileProfileContent .m-profile-cover,
  #mobileProfileContent.is-editing .m-profile-cover {
    position: absolute !important;
    z-index: 0;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 24px !important;
    background: transparent !important;
  }

  #mobileProfileContent .m-profile-cover::before {
    display: none !important;
  }

  #mobileProfileContent .m-profile-cover::after {
    position: absolute !important;
    z-index: 0;
    inset: 0 !important;
    display: block !important;
    border-radius: inherit !important;
    background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.18)), var(--m-profile-cover) center / cover no-repeat !important;
  }

  #mobileProfileContent .m-profile-avatar-stage {
    position: absolute;
    z-index: 3;
    top: 26px;
    bottom: 10px;
    left: 8px;
    width: 37%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
  }

  #mobileProfileContent .m-profile-avatar,
  #mobileProfileContent.is-editing .m-profile-avatar {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    filter: drop-shadow(0 13px 11px rgba(15,19,30,.2));
  }

  #mobileProfileContent .m-profile-main,
  #mobileProfileContent.is-editing .m-profile-main {
    position: absolute !important;
    z-index: 4;
    top: 18px;
    right: 12px;
    bottom: 12px;
    left: 40%;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 18px 13px 12px !important;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px !important;
    background: rgba(255,255,255,.88) !important;
    box-shadow: 0 12px 25px rgba(20,24,34,.12);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  #mobileProfileContent .m-profile-main::before,
  #mobileProfileContent.is-editing .m-profile-main::before {
    display: none !important;
  }

  #mobileProfileContent .m-profile-identity h2,
  #mobileProfileContent.is-editing .m-profile-identity h2 {
    margin: 0 !important;
    color: var(--m-ink) !important;
    font-size: clamp(22px, 6vw, 29px) !important;
    line-height: 1.04 !important;
  }

  #mobileProfileContent .m-profile-identity p,
  #mobileProfileContent.is-editing .m-profile-identity p {
    margin: 6px 0 0 !important;
    color: var(--m-muted) !important;
    font-size: 10px !important;
  }

  #mobileProfileContent .m-profile-stats {
    margin-top: auto !important;
    grid-template-columns: .72fr .72fr 1.56fr !important;
    border-top: 1px solid rgba(20,20,22,.1);
  }

  #mobileProfileContent .m-profile-stats span,
  #mobileProfileContent .m-profile-email-stat {
    min-width: 0;
    padding: 9px 4px 0 !important;
  }

  #mobileProfileContent .m-profile-stats strong,
  #mobileProfileContent .m-profile-email-stat strong {
    font-size: clamp(12px, 3.4vw, 16px) !important;
  }

  #mobileProfileContent .m-profile-stats small,
  #mobileProfileContent .m-profile-email-stat small {
    font-size: 9px !important;
  }

  #mobileProfileContent.is-editing .m-profile-stats {
    display: none !important;
  }

  #mobileProfileContent.is-editing .m-profile-main {
    bottom: 12px;
  }

  #mobileProfileContent .m-avatar-choice-row .m-avatar-choice img {
    border-radius: 50%;
    object-fit: cover;
  }
}
