:root { --panel: rgba(22, 22, 22, .9); --border: rgba(255, 255, 255, .14); --muted: #ababab; --text: #f5f5f5; }

body { min-height: 100vh; background: linear-gradient(135deg, #808080, #181818); }
.nav-links a.active { color: #fff; text-shadow: 0 0 12px rgba(255, 255, 255, .45); }
.logo img { display: block; filter: grayscale(1) brightness(1.5); animation: logo-breathe 3.2s ease-in-out infinite; }
.logo:hover img { animation-play-state: paused; transform: scale(1.08); }
.profile-menu-banner { background: linear-gradient(135deg, #3a3a3a, #171717); }

.elenco-page { min-height: 100vh; padding: 132px max(20px, 6vw) 64px; color: var(--text); background: linear-gradient(135deg, #050505 0%, #181818 52%, #0b0b0b 100%); }
.elenco-header, .elenco-grid { width: min(1180px, 100%); margin-inline: auto; }
.elenco-header { margin-bottom: 26px; animation: fade-up .55s ease-out both; }
.category-eyebrow { display: inline-flex; gap: 8px; align-items: center; color: #bdbdbd; font-size: .75rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 8px; }
.elenco-title { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -.05em; }
.elenco-subtitle { margin: 7px 0 0; color: var(--muted); }
.elenco-status { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--muted); font-size: .92rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #666; }
.status-dot.online { background: #4ade80; box-shadow: 0 0 12px rgba(74, 222, 128, .7); }
.status-dot.error { background: #9a9a9a; }

.elenco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 17px; }
.member-card { min-height: 300px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; color: inherit; text-align: left; cursor: pointer; background: var(--panel); box-shadow: 0 12px 32px rgba(0, 0, 0, .28); animation: fade-up .45s ease-out both; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.member-card:hover, .member-card:focus-visible { transform: translateY(-5px); border-color: rgba(255, 255, 255, .38); box-shadow: 0 20px 42px rgba(0, 0, 0, .42); outline: none; }
.member-banner { height: 142px; background: linear-gradient(135deg, #3a3a3a, #161616); background-size: cover; background-position: center; filter: grayscale(.18); }
.member-details { position: relative; padding: 0 18px 18px; }
.card-avatar-wrap { position: relative; width: max-content; z-index: 3; }
.member-avatar { width: 84px; height: 84px; display: block; margin-top: -42px; border: 4px solid #181818; border-radius: 50%; object-fit: cover; background: #303030; position: relative; z-index: 2; }
.member-decoration { position: absolute; z-index: 3; inset: -8px; width: 100px; height: 100px; pointer-events: none; object-fit: contain; }
.member-name { margin: 12px 0 3px; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-username { margin: 0; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-view { display: inline-flex; align-items: center; gap: 7px; margin-top: 17px; color: #e9e9e9; font-size: .86rem; font-weight: 700; }

.state { grid-column: 1 / -1; padding: 52px 20px; border: 1px dashed var(--border); border-radius: 18px; color: var(--muted); text-align: center; }
.spinner { width: 29px; height: 29px; margin: 0 auto 13px; border: 3px solid rgba(255, 255, 255, .18); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }

#profileDialog { width: min(510px, calc(100vw - 32px)); max-height: calc(100vh - 30px); padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 20px; color: var(--text); background: #171717; box-shadow: 0 25px 80px rgba(0, 0, 0, .65); }
#profileDialog[open] { position: fixed; inset: 0; margin: auto; }
#profileDialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }

#profileDialog .profile-banner { position: relative; z-index: 1; height: 190px; background: linear-gradient(135deg, #3b3b3b, #171717); background-size: cover; background-position: center; filter: grayscale(.18); }
#profileDialog .profile-content { position: relative; z-index: 2; max-height: min(720px, calc(100vh - 30px)); padding: 0 24px 28px; overflow-y: auto; overflow-x: hidden; }
#profileDialog .profile-content::-webkit-scrollbar { width: 6px; }
#profileDialog .profile-content::-webkit-scrollbar-thumb { background: #444; border-radius: 20px; }

.dialog-close { position: absolute; z-index: 10; top: 13px; right: 13px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: white; cursor: pointer; background: rgba(0, 0, 0, .48); font-size: 1rem; transition: background .2s ease, transform .2s ease; }
.dialog-close:hover { background: rgba(0, 0, 0, .78); transform: scale(1.04); }

.avatar-wrap { position: relative; z-index: 5; width: max-content; margin-top: -60px; }
#profileDialog .profile-avatar { position: relative; z-index: 5; width: 120px; height: 120px; display: block; margin: 0; border: 5px solid #171717; border-radius: 50%; object-fit: cover; background: #303030; }
#profileDialog .profile-decoration { position: absolute; z-index: 7; inset: -12px; width: 144px; height: 144px; object-fit: contain; pointer-events: none; }

.profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 14px; }
.profile-identity { min-width: 0; }
#profileDialog .profile-name { margin: 0 0 4px; font-size: 1.55rem; line-height: 1.15; overflow-wrap: anywhere; }
#profileDialog .profile-username { margin: 0; color: var(--muted); }
.profile-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; max-width: 46%; padding-top: 2px; }
.profile-badges[hidden] { display: none !important; }
.profile-badge { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.055); color: #e6e6e6; font-size: .78rem; }
.profile-badge i { color: #f2f2f2; }

.profile-role { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 99px; color: #ececec; font-size: .86rem; }
.profile-role i { color: #dcdcdc; }
.profile-bio { margin: 12px 0 0; padding: 13px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.035); color: #ddd; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-bio[hidden] { display: none !important; }

.profile-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.09); }
.profile-section h3 { margin: 0 0 12px; font-size: .9rem; color: #eee; }
.profile-connections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.profile-connection { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.035); color: #eee; text-decoration: none; }
.profile-connection i { font-size: 1rem; }
.profile-connection span { display: flex; flex-direction: column; min-width: 0; }
.profile-connection strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.profile-connection small { color: #8f8f8f; font-size: .7rem; }
.profile-meta { display: grid; gap: 8px; }
.meta-row { display: flex; justify-content: space-between; gap: 15px; padding: 9px 11px; border-radius: 9px; background: rgba(255,255,255,.035); font-size: .75rem; }
.meta-row span { color: #8f8f8f; }
.meta-row strong { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ddd; font-weight: 600; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes logo-breathe { 0%, 100% { opacity: .78; transform: scale(1); } 50% { opacity: 1; transform: scale(1.045); } }

@media (max-width: 520px) {
  .elenco-page { padding-top: 92px; }
  .elenco-grid { grid-template-columns: 1fr; }
  .member-card { min-height: 260px; }
  .member-banner { height: 130px; }
  #profileDialog .profile-content { padding-inline: 18px; }
  .profile-head { gap: 10px; }
  .profile-badges { max-width: 42%; }
  .profile-connections { grid-template-columns: 1fr; }
  .meta-row { flex-direction: column; gap: 3px; }
  .meta-row strong { max-width: 100%; }
}

/* Perfil inspirado no pop-up atual do Discord */
#profileDialog {
    width: min(520px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 28px));
    border-radius: 16px;
    background: #1e1f22;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 70px rgba(0,0,0,.72), 0 0 0 1px rgba(0,0,0,.2);
}
#profileDialog .profile-banner {
    height: 190px;
    position: relative;
    background-color: #313338;
    background-size: cover;
    background-position: center;
    filter: none;
}
#profileDialog .profile-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.04), rgba(0,0,0,.08));
    pointer-events: none;
}
#profileDialog .profile-content {
    position: relative;
    padding: 0 24px 26px;
    background: #1e1f22;
}
#profileDialog .avatar-wrap {
    position: relative;
    width: 108px;
    height: 108px;
    margin-top: -54px;
    flex: 0 0 108px;
    z-index: 4;
}
#profileDialog .profile-avatar {
    position: relative;
    z-index: 1;
    width: 108px;
    height: 108px;
    margin: 0;
    border: 6px solid #1e1f22;
    border-radius: 50%;
    object-fit: cover;
    background: #313338;
}
#profileDialog .profile-decoration {
    position: absolute;
    z-index: 3;
    inset: -14px;
    width: 136px;
    height: 136px;
    object-fit: contain;
    pointer-events: none;
}
#profileDialog .profile-identity {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    min-height: 120px;
    position: relative;
}
#profileDialog .profile-identity-text {
    min-width: 0;
    padding-bottom: 5px;
}
#profileDialog .profile-name {
    margin: 0;
    color: #f2f3f5;
    font-size: 1.55rem;
    line-height: 1.15;
    letter-spacing: -.025em;
    font-weight: 700;
}
#profileDialog .profile-username {
    margin: 4px 0 0;
    color: #b5bac1;
    font-size: .91rem;
}
#profileDialog .profile-badges {
    margin: 0 0 7px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    max-width: 180px;
}
#profileDialog .profile-badge {
    width: 30px;
    height: 30px;
    justify-content: center;
    padding: 0;
    border: 1px solid #3b3d42;
    border-radius: 8px;
    background: #2b2d31;
    color: #dbdee1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
#profileDialog .profile-badge span { display: none; }
#profileDialog .profile-badge i { font-size: .84rem; color: #c9ccd1; }
#profileDialog .profile-divider {
    height: 1px;
    margin: 7px 0 18px;
    background: #34363c;
}
#profileDialog .profile-role {
    margin: 0;
    padding: 7px 10px;
    border: 1px solid #3b3d42;
    border-radius: 999px;
    background: #232428;
    color: #dbdee1;
    font-size: .8rem;
    font-weight: 600;
}
#profileDialog .profile-about-section {
    margin-top: 19px;
}
#profileDialog .profile-about-section h3,
#profileDialog .profile-section h3 {
    margin: 0 0 8px;
    color: #f2f3f5;
    font-size: .75rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .025em;
    font-weight: 700;
}
#profileDialog .profile-bio {
    margin: 0;
    min-height: 50px;
    padding: 11px 12px;
    border: 0;
    border-radius: 8px;
    background: #2b2d31;
    color: #dbdee1;
    font-size: .86rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
#profileDialog .profile-bio-placeholder {
    color: #8e9297;
    font-style: italic;
}
#profileDialog .profile-section {
    margin-top: 20px;
    padding-top: 0;
    border-top: 0;
}
#profileDialog .profile-connections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
#profileDialog .profile-connection {
    position: relative;
    min-width: 0;
    padding: 10px 11px;
    border: 0;
    border-radius: 8px;
    background: #2b2d31;
    color: #dbdee1;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}
#profileDialog .profile-connection:hover {
    background: #32343a;
    transform: translateY(-1px);
}
#profileDialog .profile-connection > i:first-child {
    flex: 0 0 22px;
    font-size: 1.08rem;
    color: #b5bac1;
}
#profileDialog .profile-connection span { min-width: 0; }
#profileDialog .profile-connection strong {
    color: #f2f3f5;
    font-size: .78rem;
    font-weight: 600;
}
#profileDialog .profile-connection small {
    margin-top: 2px;
    color: #949ba4;
    font-size: .67rem;
}
#profileDialog .connection-arrow {
    margin-left: auto;
    color: #72767d !important;
    font-size: .68rem !important;
}
#profileDialog .profile-meta-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #34363c;
}
#profileDialog .profile-meta {
    gap: 6px;
}
#profileDialog .meta-row {
    padding: 8px 10px;
    border-radius: 7px;
    background: #232428;
    font-size: .72rem;
}
#profileDialog .meta-row span { color: #949ba4; }
#profileDialog .meta-row strong { color: #dbdee1; }
#profileDialog .dialog-close {
    z-index: 10;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(17,18,20,.72);
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
}
#profileDialog .dialog-close:hover { background: rgba(17,18,20,.94); }
@media (max-width: 560px) {
    #profileDialog .profile-content { padding-inline: 18px; }
    #profileDialog .profile-identity { gap: 10px; }
    #profileDialog .profile-badges { max-width: 125px; }
    #profileDialog .profile-connections { grid-template-columns: 1fr; }
}

/* Ajuste final: perfil visualmente mais próximo do pop-up do Discord */
#profileDialog {
  width: min(520px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 70px rgba(0,0,0,.72), 0 0 0 1px rgba(0,0,0,.22);
}
#profileDialog .profile-banner { height: 190px; background-color: #313338; background-size: cover; background-position: center; filter: none; }
#profileDialog .profile-content { max-height: min(760px, calc(100vh - 28px)); padding: 0 24px 26px; overflow-y: auto; background: #1e1f22; }
#profileDialog .profile-content::-webkit-scrollbar { width: 6px; }
#profileDialog .profile-content::-webkit-scrollbar-thumb { background: #444; border-radius: 20px; }
#profileDialog .profile-head { position: relative; display: flex; align-items: flex-end; gap: 14px; min-height: 118px; margin-top: 0; }
#profileDialog .avatar-wrap { position: relative; z-index: 5; width: 108px; height: 108px; margin-top: -54px; flex: 0 0 108px; }
#profileDialog .profile-avatar { position: relative; z-index: 6; width: 108px; height: 108px; margin: 0; border: 6px solid #1e1f22; border-radius: 50%; object-fit: cover; background: #313338; }
#profileDialog .profile-decoration { position: absolute; z-index: 8; inset: -14px; width: 136px; height: 136px; object-fit: contain; pointer-events: none; }
#profileDialog .profile-identity { min-width: 0; padding-bottom: 6px; }
#profileDialog .profile-name { margin: 0 0 4px; color: #f2f3f5; font-size: 1.55rem; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
#profileDialog .profile-username { margin: 0; color: #b5bac1; font-size: .91rem; }
#profileDialog .profile-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; max-width: 170px; margin: 0 0 8px auto; }
#profileDialog .profile-badges[hidden] { display: none !important; }
#profileDialog .profile-badge { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #3b3d42; border-radius: 8px; background: #2b2d31; color: #dbdee1; }
#profileDialog .profile-badge span { display: none; }
#profileDialog .profile-badge i { color: #c9ccd1; font-size: .82rem; }
#profileDialog .profile-role { display: inline-flex; align-items: center; gap: 7px; margin-top: 2px; padding: 7px 10px; border: 1px solid #3b3d42; border-radius: 999px; background: #232428; color: #dbdee1; font-size: .8rem; font-weight: 600; }
#profileDialog .profile-about-section { margin-top: 20px; }
#profileDialog .profile-about-section h3, #profileDialog .profile-section h3 { margin: 0 0 8px; color: #f2f3f5; font-size: .75rem; line-height: 1.2; text-transform: uppercase; letter-spacing: .025em; font-weight: 700; }
#profileDialog .profile-bio { min-height: 50px; margin: 0; padding: 11px 12px; border: 0; border-radius: 8px; background: #2b2d31; color: #dbdee1; font-size: .86rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
#profileDialog .profile-bio-placeholder { color: #8e9297; font-style: italic; }
#profileDialog .profile-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #34363c; }
#profileDialog .profile-connections { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
#profileDialog .profile-connection { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 11px; border: 0; border-radius: 8px; background: #2b2d31; color: #dbdee1; text-decoration: none; transition: background .15s ease, transform .15s ease; }
#profileDialog .profile-connection:hover { background: #32343a; transform: translateY(-1px); }
#profileDialog .profile-connection > i:first-child { flex: 0 0 22px; color: #b5bac1; font-size: 1.08rem; }
#profileDialog .profile-connection span { display: flex; flex-direction: column; min-width: 0; }
#profileDialog .profile-connection strong { color: #f2f3f5; font-size: .78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profileDialog .profile-connection small { margin-top: 2px; color: #949ba4; font-size: .67rem; }
#profileDialog .connection-arrow { margin-left: auto; color: #72767d !important; font-size: .68rem !important; }
#profileDialog .profile-meta-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #34363c; }
#profileDialog .profile-meta { gap: 6px; }
#profileDialog .meta-row { padding: 8px 10px; border-radius: 7px; background: #232428; font-size: .72rem; }
#profileDialog .meta-row span { color: #949ba4; }
#profileDialog .meta-row strong { color: #dbdee1; }
#profileDialog .dialog-close { z-index: 20; top: 14px; right: 14px; width: 36px; height: 36px; background: rgba(17,18,20,.72); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px); }
#profileDialog .dialog-close:hover { background: rgba(17,18,20,.94); }
@media (max-width: 560px) {
  #profileDialog .profile-content { padding-inline: 18px; }
  #profileDialog .profile-head { gap: 10px; }
  #profileDialog .profile-badges { max-width: 125px; }
  #profileDialog .profile-connections { grid-template-columns: 1fr; }
}

/* Tema do perfil vindo dos dados disponíveis do Discord.
   Se o Discord passar cores/estilos no futuro, o card os aplica sem alterar o layout. */
#profileDialog {
  --profile-primary: #5865f2;
  --profile-secondary: #7c5cff;
  --profile-glow: rgba(88,101,242,.4);
  --profile-surface: rgba(88,101,242,.08);
  background: linear-gradient(180deg, var(--profile-surface), transparent 36%), #1e1f22;
  border-color: color-mix(in srgb, var(--profile-primary) 30%, rgba(255,255,255,.08));
  box-shadow: 0 24px 70px rgba(0,0,0,.72), 0 0 38px var(--profile-glow);
}
#profileDialog .profile-banner {
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--profile-primary) 22%, transparent), transparent 65%), var(--profile-banner-image, linear-gradient(135deg,#313338,#18191c));
}
#profileDialog .profile-head {
  position: relative;
}
#profileDialog .profile-effect {
  position: absolute;
  z-index: 9;
  inset: 0;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: .72;
  mix-blend-mode: screen;
  animation: profile-effect-fade 1.2s ease-out both;
}
#profileDialog .profile-effect[hidden] { display: none !important; }
#profileDialog .profile-effect.is-active { display: block; }
#profileDialog .profile-name {
  color: var(--profile-primary) !important;
  text-shadow: 0 0 18px color-mix(in srgb, var(--profile-primary) 28%, transparent);
}
#profileDialog .profile-role,
#profileDialog .profile-badge {
  border-color: color-mix(in srgb, var(--profile-primary) 32%, #3b3d42);
  background: color-mix(in srgb, var(--profile-primary) 10%, #2b2d31);
}
#profileDialog .profile-bio {
  border-left: 3px solid var(--profile-primary);
}
@keyframes profile-effect-fade {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: .72; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #profileDialog .profile-effect { animation: none; }
}


/* Layout final solicitado: avatar/decoracao sobre o banner e identidade abaixo da foto. */
#profileDialog .profile-head {
  display: block;
  min-height: 0;
  margin: 0;
}
#profileDialog .avatar-wrap {
  position: relative;
  z-index: 8;
  width: 108px;
  height: 108px;
  margin-top: -54px;
  margin-bottom: 12px;
}
#profileDialog .profile-avatar {
  position: relative;
  z-index: 9;
}
#profileDialog .profile-decoration {
  position: absolute;
  z-index: 10;
  inset: -14px;
  width: 136px;
  height: 136px;
}
#profileDialog .profile-identity {
  min-width: 0;
  padding: 0;
}
#profileDialog .profile-name {
  margin: 0 0 3px;
}
#profileDialog .profile-username {
  margin: 0;
}
#profileDialog .profile-role {
  margin-top: 14px;
}
#profileDialog .profile-meta-section {
  margin-top: 20px;
}

#profileDialog .profile-badges,
#profileDialog .profile-about-section,
#profileDialog .profile-connections-section,
#profileDialog .profile-connections { display: none !important; }


/* Correção definitiva: o banner fica atrás do avatar e da decoração. */
#profileDialog {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
#profileDialog .profile-banner {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  height: 190px;
  margin: 0;
  background-color: #313338;
  background-size: cover;
  background-position: center;
  filter: none;
}
#profileDialog .profile-content {
  position: relative;
  z-index: 2;
  max-height: min(760px, calc(100vh - 28px));
  padding: 190px 24px 26px;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(to bottom, transparent 0, transparent 190px, #1e1f22 190px, #1e1f22 100%);
}
#profileDialog .profile-head {
  position: relative;
  z-index: 4;
  display: block;
  min-height: 0;
  margin: 0;
}
#profileDialog .avatar-wrap {
  position: relative;
  z-index: 6;
  width: 108px;
  height: 108px;
  margin-top: -54px;
  margin-bottom: 12px;
}
#profileDialog .profile-avatar {
  position: relative;
  z-index: 7;
}
#profileDialog .profile-decoration {
  position: absolute;
  z-index: 8;
  inset: -14px;
  width: 136px;
  height: 136px;
  object-fit: contain;
  pointer-events: none;
}
#profileDialog .profile-effect {
  z-index: 5;
}
#profileDialog .profile-identity {
  position: relative;
  z-index: 6;
}
#profileDialog .dialog-close { z-index: 20; }
