.profilePage {
  display: grid;
  gap: 22px;
}

.profileCard,
.postsPanel,
.commentForm,
.commentForm__foot {
  display: grid;
  gap: 14px;
}

.profileCard,
.postsPanel {
  padding: 20px;
}

.profileCard__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: start;
}

.avatar {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 20px;
  border: 3px solid rgba(95, 70, 40, 0.14);
}

.identity {
  display: grid;
  gap: 10px;
}

.steamid {
  color: var(--tf-muted);
  font-family: var(--tf-display);
  text-transform: uppercase;
  font-size: 0.82rem;
}

.badges,
.profileCard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.xpPanel {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(95, 70, 40, 0.14);
  background: rgba(255, 252, 246, 0.68);
}

.xpPanel__head,
.xpPanel__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.xpPanel__label {
  display: block;
  margin-bottom: 6px;
  color: var(--tf-muted);
  font-family: var(--tf-display);
  text-transform: uppercase;
  font-size: 0.74rem;
}

.xpBar {
  margin-top: 12px;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(95, 70, 40, 0.12);
}

.xpBar__fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--tf-orange), var(--tf-brass-2));
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
}

.stat span {
  display: block;
  color: var(--tf-muted);
  font-family: var(--tf-display);
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 8px;
}

.stat b {
  font-family: var(--tf-display);
  font-size: 1.12rem;
}

.panelHead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.comments {
  display: grid;
  gap: 12px;
}

.comment,
.comment__content,
.comment__meta,
.comment__authorWrap {
  display: grid;
  gap: 10px;
}

.comment {
  grid-template-columns: auto 1fr;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(95, 70, 40, 0.14);
  background: rgba(255, 255, 255, 0.5);
}

.comment__avatar {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(95, 70, 40, 0.16);
}

.comment__meta {
  grid-template-columns: 1fr auto;
}

.comment__metaRight {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.comment__body {
  white-space: pre-wrap;
}

.commentForm textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(95, 70, 40, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--tf-ink);
}

.commentForm__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .profileCard__head {
    grid-template-columns: auto 1fr;
  }

  .profileCard__actions {
    grid-column: 1 / -1;
  }

  .statsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profileCard,
  .postsPanel {
    padding: 16px;
  }

  .profileCard__head {
    grid-template-columns: 1fr;
  }

  .statsGrid {
    grid-template-columns: 1fr;
  }

  .commentForm__foot {
    align-items: stretch;
  }

  .comment,
  .comment__meta {
    grid-template-columns: 1fr;
  }
}
