.engagement-section {
  display: grid;
  gap: 24px;
  padding-top: 24px;
}

.engagement-heading {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.engagement-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.like-panel,
.comments-panel {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(7, 8, 12, 0.34);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.like-panel {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  min-height: 360px;
}

.like-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 26px;
  border: 1px solid rgba(255, 122, 34, 0.28);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 122, 34, 0.92), rgba(255, 75, 31, 0.92));
  box-shadow: 0 18px 48px rgba(255, 75, 31, 0.34);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.like-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(255, 122, 34, 0.42);
}

.like-button:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.like-button.is-liked {
  background: linear-gradient(135deg, rgba(255, 122, 34, 0.72), rgba(255, 214, 107, 0.72));
}

.like-button-icon {
  color: var(--warm);
  font-size: 22px;
  line-height: 1;
}

.like-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 0;
  color: var(--muted);
}

.like-count strong {
  color: #fff;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.engagement-status {
  margin: 0;
  color: var(--subtle);
  font-size: 14px;
  text-align: center;
}

.engagement-status[data-status="success"] {
  color: rgba(124, 255, 178, 0.78);
}

.engagement-status[data-status="error"] {
  color: rgba(255, 214, 107, 0.9);
}

.comments-panel {
  display: grid;
  gap: 18px;
}

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

.comments-header h3 {
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  letter-spacing: -0.035em;
}

.comment-count {
  margin: 0;
  color: var(--subtle);
  font-size: 14px;
  white-space: nowrap;
}

.comment-form,
.reply-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.28fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.comment-form {
  margin-bottom: 8px;
}

.comment-form label,
.reply-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.comment-form input,
.comment-form textarea,
.reply-form input,
.reply-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.comment-form input,
.reply-form input {
  min-height: 48px;
  padding: 0 14px;
}

.comment-form textarea,
.reply-form textarea {
  min-height: 112px;
  padding: 13px 14px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus,
.reply-form input:focus,
.reply-form textarea:focus {
  border-color: rgba(255, 214, 107, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 214, 107, 0.12);
  background: rgba(7, 8, 12, 0.58);
}

.comment-form button,
.reply-form button {
  min-height: 48px;
  border: 0;
  cursor: pointer;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--subtle);
  text-align: center;
}

.comment-card,
.reply-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 8, 12, 0.32);
}

.comment-card {
  padding: 18px;
}

.reply-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--subtle);
  font-size: 13px;
}

.comment-meta strong {
  color: #fff;
  font-size: 14px;
}

.comment-meta time {
  white-space: nowrap;
}

.comment-content {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.68;
  white-space: pre-wrap;
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.comment-reply-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--warm);
  background: rgba(255, 214, 107, 0.1);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.comment-reply-button:hover {
  color: #fff;
  background: rgba(255, 214, 107, 0.18);
}

.reply-form {
  margin: 14px 0 2px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.reply-form textarea {
  min-height: 86px;
}

.reply-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 214, 107, 0.22);
}

@media (max-width: 900px) {
  .engagement-grid {
    grid-template-columns: 1fr;
  }

  .like-panel {
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .comments-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .like-button {
    width: 100%;
  }

  .like-count {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
  }
}
