.post-detail-card {
  padding: 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.post-detail-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.post-top-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.post-detail-header h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 5vw, 44px);
  color: #172554;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.post-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-detail-meta span {
  padding: 7px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.post-detail-content {
  margin-top: 28px;
  white-space: pre-wrap;
  line-height: 1.85;
  color: #374151;
  font-size: 17px;
}

.post-detail-actions {
  display: flex;
  gap: 10px;
}

.top-actions {
  flex-shrink: 0;
}

.post-detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 13px;
  text-decoration: none;
  font-weight: 900;
  transition: 0.18s;
  white-space: nowrap;
}

.edit-link {
  background: var(--primary-soft);
  color: var(--primary);
}

.delete-link {
  background: #fef2f2;
  color: #dc2626;
}

.report-link {
  background: #fff7ed;
  color: #dc2626;
}

.post-detail-actions a:hover {
  transform: translateY(-2px);
}

.comment-section {
  margin-top: 28px;
  padding: 30px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.comment-header h2 {
  margin: 0 0 6px;
  font-size: 30px;
  color: #172554;
  letter-spacing: -0.04em;
}

.comment-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.comment-header > span {
  padding: 7px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  font-size: 16px;
  background: #fbfdff;
  outline: none;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 91, 219, 0.12);
  background: white;
}

.comment-form textarea {
  min-height: 120px;
}

.comment-form button {
  justify-self: end;
  min-height: 46px;
  padding: 13px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(59, 91, 219, 0.18);
}

.comment-form button:hover {
  background: var(--primary-dark);
}

.comment-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.comment-card {
  padding: 18px;
  background: #f8faff;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.comment-meta strong {
  color: #1f2937;
}

.comment-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.comment-card p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
  color: #374151;
}

.empty-comments {
  padding: 28px;
  background: #f8faff;
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

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

.comment-report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.18s;
}

.comment-report-link:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==============================
   Mobile
============================== */
@media (max-width: 700px) {
  .post-detail-card,
  .comment-section {
    padding: 24px;
    border-radius: 22px;
  }

  .post-top-row {
    flex-direction: column;
    gap: 18px;
  }

  .post-detail-header h1 {
    font-size: clamp(30px, 10vw, 40px);
    line-height: 1.2;
  }

  .post-detail-meta span {
    border-radius: 13px;
    line-height: 1.4;
  }

  .post-detail-content {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.8;
  }

  .top-actions {
    width: 100%;
  }

  .post-detail-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .post-detail-actions a {
    width: 100%;
    padding: 12px 10px;
    font-size: 14px;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-header h2 {
    font-size: 28px;
  }

  .comment-header > span {
    border-radius: 13px;
  }

  .comment-form button {
    width: 100%;
    justify-self: stretch;
  }

  .comment-meta {
    flex-direction: column;
    gap: 4px;
  }

  .comment-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 430px) {
  .post-detail-card,
  .comment-section {
    padding: 20px;
  }

  .post-detail-actions {
    grid-template-columns: 1fr;
  }

  .comment-card {
    padding: 16px;
  }
}

/* ==============================
   v1.2.1 Mobile Detail Redesign
============================== */
@media (max-width: 700px) {
  .post-detail-card,
  .comment-section {
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.045);
  }

  .post-detail-header h1 {
    font-size: clamp(29px, 9vw, 38px);
  }

  .post-detail-meta span {
    background: #eef2ff;
  }

  .post-detail-actions {
    gap: 8px;
  }

  .post-detail-actions a {
    border-radius: 14px;
    box-shadow: none;
  }

  .comment-header h2 {
    font-size: 25px;
  }

  .comment-card {
    background: #f8faff;
    border-radius: 16px;
  }

  .comment-form input,
  .comment-form textarea,
  .comment-form button {
    border-radius: 15px;
  }
}

/* ==============================
   Mobile post detail compact header - fixed
============================== */
@media (max-width: 700px) {
  .post-detail-card {
    padding: 20px;
  }

  .post-detail-header {
    position: relative;
    padding-bottom: 18px;
  }

  .post-top-row {
    display: block;
  }

  .post-detail-header h1 {
    margin: 0 0 10px;
    padding-right: 116px;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1.2;
  }

  .top-actions {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
  }

  .post-detail-actions {
    display: flex !important;
    justify-content: flex-end;
    gap: 5px;
    width: auto !important;
  }

  .post-detail-actions a {
    width: auto !important;
    flex: none !important;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 900;
    border-radius: 9px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .post-detail-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    margin-top: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .post-detail-meta::-webkit-scrollbar {
    display: none;
  }

  .post-detail-meta span {
    flex-shrink: 0;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .post-detail-content {
    margin-top: 22px;
  }

  .comment-section {
    padding: 20px;
  }
}

@media (max-width: 430px) {
  .post-detail-header h1 {
    padding-right: 104px;
  }

  .post-detail-actions a {
    padding: 5px 7px;
    font-size: 10px;
  }
}