/* Cabeçalho do perfil em tablets, janelas estreitas e celulares. */
@media (max-width: 900px) {
  #socialView .hero {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    grid-template-areas:
      "avatar identity"
      "stats stats"
      "actions actions";
    gap: 18px 20px;
    min-height: 0;
    padding: 24px 22px;
    overflow: hidden;
  }
  #socialView .hero .cover,
  #socialView .hero .hero-shade { position: absolute; }
  #socialView .hero .avatar {
    position: relative;
    z-index: 2;
    grid-area: avatar;
    align-self: start;
    left: auto;
    top: auto;
    width: 116px;
    height: 116px;
  }
  #socialView .hero .identity {
    position: relative;
    z-index: 2;
    grid-area: identity;
    align-self: center;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
    min-width: 0;
  }
  #socialView .hero .identity h1 {
    overflow-wrap: anywhere;
    font-size: clamp(24px, 5vw, 32px);
  }
  #socialView .hero .identity p {
    display: -webkit-box;
    max-height: 68px;
    margin: 10px 0 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  #socialView .hero .identity-meta { gap: 6px 18px; }
  #socialView .hero .stats {
    position: relative;
    z-index: 2;
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    left: auto;
    right: auto;
    bottom: auto;
    gap: 10px;
  }
  #socialView .hero .stats div {
    min-width: 0;
    padding: 12px 6px;
    border: 1px solid rgba(74, 89, 113, .32);
    border-radius: 11px;
    background: rgba(8, 14, 24, .74);
  }
  #socialView .hero .stats span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #socialView .hero .profile-actions {
    position: relative;
    z-index: 2;
    grid-area: actions;
    left: auto;
    right: auto;
    bottom: auto;
  }
  #socialView .hero .profile-actions button { width: 100%; }
  #socialView .hero .avatar-edit { z-index: 4; left: 101px; top: 99px; }
  #socialView .tabs {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  #socialView .tabs::-webkit-scrollbar { display: none; }
  #socialView .tabs button { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 540px) {
  #socialView .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "avatar"
      "identity"
      "stats"
      "actions";
    gap: 14px;
    padding: 20px 16px;
  }
  #socialView .hero .avatar { justify-self: center; }
  #socialView .hero .identity { text-align: center; }
  #socialView .hero .identity-meta { justify-content: center; }
  #socialView .hero .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #socialView .hero .avatar-edit { left: calc(50% + 29px); top: 95px; }
}
