.comments {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.comments__head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.comments__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.comments__count {
  color: var(--muted);
  font-size: 0.85rem;
}

.comments__composer,
.profile-wall__composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  margin-bottom: 1.1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.comments__composer textarea,
.profile-wall__composer textarea {
  width: 100%;
  min-height: 4.2rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  padding: 0.65rem 0.75rem;
  outline: none;
}

.comments__composer textarea:focus,
.profile-wall__composer textarea:focus {
  border-color: var(--accent-ring);
}

.comments__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.comments__avatar--f {
  display: grid;
  place-items: center;
  background: rgba(204, 28, 57, 0.25);
  font-weight: 700;
  color: #fff;
}

.comments__login {
  color: var(--muted);
  margin: 0 0 1rem;
}

.comments__login a {
  color: var(--rose-strong);
  font-weight: 600;
}

.comments__list,
.profile-wall__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.comments__item,
.profile-wall__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.comments__meta,
.profile-wall__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
}

.comments__meta a,
.profile-wall__meta a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.comments__meta a:hover,
.profile-wall__meta a:hover {
  color: var(--rose);
}

.comments__role {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: rgba(204, 28, 57, 0.85);
  color: #fff;
}

.comments__meta time,
.profile-wall__meta time {
  color: var(--muted);
  font-size: 0.78rem;
}

.comments__text,
.profile-wall__content p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.comments__del {
  margin-top: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.comments__del:hover {
  color: var(--rose-strong);
}

.comments__empty {
  color: var(--muted);
  padding: 0.5rem 0;
}

.comments__composer-main {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.comments__reply-to {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(204, 28, 57, 0.12);
  color: #fecdd3;
  font-size: 0.8rem;
}

.comments__reply-cancel {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.comments__reply-cancel:hover {
  color: var(--text);
}

.comments__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.comments__react {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  opacity: 0.72;
}

.comments__react.is-empty {
  opacity: 0.55;
}

.comments__react:hover:not(:disabled),
.comments__react.is-mine {
  opacity: 1;
  border-color: rgba(204, 28, 57, 0.45);
  background: rgba(204, 28, 57, 0.14);
}

.comments__react:disabled {
  cursor: default;
}

.comments__react-count {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.comments__reply-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.comments__reply-btn:hover {
  color: var(--rose-strong);
}

.comments__replies {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0 0 0 0.35rem;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.65rem;
}

.comments__item--reply {
  padding: 0.55rem 0 0.55rem 0.75rem;
}

/* Profile */
.profile-page {
  padding-bottom: 3rem;
}

.profile-hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #141416;
  margin-bottom: 0.85rem;
}

.profile-hero__banner {
  position: relative;
  height: clamp(140px, 28vw, 220px);
  background:
    linear-gradient(120deg, rgba(204, 28, 57, 0.45), rgba(24, 24, 27, 0.2)),
    radial-gradient(ellipse at 70% 40%, rgba(88, 101, 242, 0.35), transparent 55%),
    #1c1c1f;
  background-size: cover;
  background-position: center;
}

.profile-hero__banner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 22, 0.05) 20%,
    rgba(20, 20, 22, 0.55) 62%,
    rgba(20, 20, 22, 0.96) 100%
  );
}

.profile-hero__banner.is-empty {
  background-image:
    linear-gradient(120deg, rgba(204, 28, 57, 0.45), rgba(24, 24, 27, 0.35)),
    radial-gradient(ellipse at 70% 40%, rgba(88, 101, 242, 0.35), transparent 55%);
}

.profile-hero__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: end;
  padding: 0 1.15rem 1.15rem;
  margin-top: -48px;
  position: relative;
}

.profile-hero__avatar {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  border: 3px solid #18181b;
  background: #27272a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.profile-hero__avatar--f {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  background: rgba(204, 28, 57, 0.35);
}

.profile-hero__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.profile-hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #fafafa;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 14px rgba(0, 0, 0, 0.75);
}

.profile-hero__badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(204, 28, 57, 0.95);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

.profile-hero__badge.role-badge--admin {
  color: #fff !important;
  background: rgba(204, 28, 57, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.35) !important;
}

.profile-hero__badge.role-badge--mod {
  color: #fff !important;
  background: rgba(14, 165, 233, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.35) !important;
}

.profile-hero__badge.role-badge--banned {
  background: #7f1d1d !important;
  color: #fecaca !important;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45);
}

.profile-hero__sanction {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
}

.profile-hero__sanction--mute {
  color: #fcd34d;
}

.profile-hero__sanction--ban {
  color: #fca5a5;
}

.profile-hero__sanction strong {
  font-weight: 700;
  color: #fde68a;
}

.profile-mod-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(204, 28, 57, 0.45);
  border-radius: 8px;
  background: rgba(204, 28, 57, 0.12);
  color: #fecdd3;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.profile-mod-btn:hover,
.profile-mod-btn.is-open {
  background: rgba(204, 28, 57, 0.85);
  border-color: transparent;
  color: #fff;
}

.profile-mod-pop {
  position: fixed;
  inset: 0;
  z-index: 430;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.profile-mod-pop__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(6px);
}

.profile-mod-pop__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 1.25rem;
  border-radius: 4px 16px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(204, 28, 57, 0.14) 0%, transparent 40%),
    #161618;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 1rem;
}

.profile-mod-pop__eyebrow {
  margin: 0 0 0.3rem;
  font-family: var(--font-eyebrow);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose-strong);
}

.profile-mod-pop__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.profile-mod-pop__head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.profile-mod-pop__block {
  display: grid;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.profile-mod-pop__label {
  font-family: var(--font-eyebrow);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-mod-pop__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.profile-mod-pop__row .k-select {
  width: 100%;
  min-width: 0;
}

.profile-mod-pop__close {
  justify-self: end;
}

.profile-hero__discord,
.profile-hero__bio {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-hero__edit,
.profile-hero__follow {
  align-self: start;
  margin-top: 3rem;
}

.profile-stats {
  display: grid;
  grid-template-columns: auto auto auto auto 1fr;
  gap: 1.25rem;
  align-items: end;
  padding: 0.85rem 0.2rem 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.profile-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-stats strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.profile-stats__meta {
  justify-self: end;
  text-align: right;
  display: grid;
  gap: 0.2rem;
}

.profile-tabs {
  display: flex;
  gap: 0;
  margin: 0 0 1.15rem;
  background: rgba(204, 28, 57, 0.92);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.profile-tabs button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  position: relative;
}

.profile-tabs button.is-active {
  color: #fff;
}

.profile-tabs button.is-active::after {
  content: '';
  position: absolute;
  left: 1.15rem;
  right: 1.15rem;
  bottom: 0.45rem;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.profile-wall__list {
  margin-top: 0.25rem;
}

.profile-info {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.profile-info dl {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.profile-info dl > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.75rem;
}

.profile-info dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-info dd {
  margin: 0;
}

@media (max-width: 720px) {
  .profile-hero__row {
    grid-template-columns: auto 1fr;
  }

  .profile-hero__edit,
  .profile-hero__follow {
    grid-column: 1 / -1;
    margin-top: 0;
    width: 100%;
  }

  .profile-stats {
    grid-template-columns: 1fr 1fr;
  }

  .profile-stats__meta {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }

  .comments__composer,
  .profile-wall__composer {
    grid-template-columns: auto 1fr;
  }

  .comments__composer .btn,
  .profile-wall__composer .btn {
    grid-column: 1 / -1;
  }
}
