/* ══════════════════════════════════════════════════════════════
   新闻详情页：点赞 / 评论 / 转发 / 朋友圈 + 评论区
   移动端与桌面端共用一套布局，断点 640px
   ══════════════════════════════════════════════════════════════ */

/* ── 互动条 ── */
.nd-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 36px 0 8px;
  flex-wrap: wrap;
}
.nd-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: var(--radius-full, 999px);
  background: #fff;
  color: var(--text-secondary, #4B5563);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.nd-act:hover {
  border-color: var(--primary, #2563EB);
  color: var(--primary, #2563EB);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .12);
}
.nd-act:active { transform: translateY(0) scale(.98); }
.nd-act svg { width: 19px; height: 19px; flex-shrink: 0; }
.nd-act.is-on {
  background: #FEF2F2;
  border-color: #FCA5A5;
  color: #DC2626;
}
.nd-act.is-on svg { fill: currentColor; }
.nd-act-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  opacity: .8;
}
.nd-act.is-on .nd-act-count { opacity: 1; font-weight: 700; }

/* 点赞动效 */
@keyframes nd-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  100% { transform: scale(1); }
}
.nd-act.pop svg { animation: nd-pop .42s ease; }

/* ── 弹层（转发 / 须知） ── */
.nd-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.nd-modal[hidden] { display: none; }
.nd-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
}
.nd-modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  animation: nd-modal-in .22s ease;
}
@keyframes nd-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.nd-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.nd-modal-head h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text-primary, #111827);
}
.nd-modal-x {
  border: none;
  background: #F3F4F6;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: #6B7280;
  cursor: pointer;
}
.nd-modal-x:hover { background: #E5E7EB; color: #111827; }

/* 分享按钮：主色描边，比其它两个更显眼一点 */
.nd-act-share {
  border-color: rgba(37, 99, 235, .35);
  color: var(--primary, #2563EB);
}
.nd-act-share:hover { background: #EFF6FF; }

.nd-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(17, 24, 39, .92);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.875rem;
  z-index: 2100;
  opacity: 0;
  pointer-events: none;
  transition: all .24s ease;
  max-width: 82vw;
  text-align: center;
}
.nd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 评论区 ── */
.nd-comments {
  margin: 40px 0 8px;
  padding: 26px 26px 20px;
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 18px;
}
.nd-comments-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.nd-comments-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary, #111827);
}
.nd-comments-head h2 span { color: var(--primary, #2563EB); }
.nd-notice-link {
  border: none;
  background: none;
  color: var(--text-tertiary, #6B7280);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.nd-notice-link:hover { color: var(--primary, #2563EB); }

/* 表单 */
.nd-comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}
.nd-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.nd-cf-nick {
  width: 220px;
  max-width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary, #111827);
  background: #F9FAFB;
  transition: border-color .18s, background .18s;
}
.nd-cf-text {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.75;
  font-family: inherit;
  color: var(--text-primary, #111827);
  background: #F9FAFB;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.nd-cf-nick:focus, .nd-cf-text:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.nd-cf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nd-cf-count {
  font-size: 0.75rem;
  color: var(--text-tertiary, #9CA3AF);
  font-variant-numeric: tabular-nums;
}
.nd-cf-submit {
  height: 40px;
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  background: var(--primary, #2563EB);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .18s, transform .18s;
}
.nd-cf-submit:hover { opacity: .92; }
.nd-cf-submit:active { transform: scale(.98); }
.nd-cf-submit:disabled { opacity: .55; cursor: default; }
.nd-cf-msg {
  font-size: 0.8125rem;
  line-height: 1.6;
  min-height: 18px;
}
.nd-cf-msg.err { color: #DC2626; }
.nd-cf-msg.ok { color: #059669; }
.nd-cf-msg.wait { color: #B45309; }

/* 列表 */
.nd-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nd-comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border, #F1F5F9);
}
.nd-comment:first-child { border-top: none; }
.nd-c-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563EB, #38BDF8);
  user-select: none;
}
.nd-c-body { flex: 1; min-width: 0; }
.nd-c-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.nd-c-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
}
.nd-c-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary, #2563EB);
  border-radius: 4px;
  padding: 1px 6px;
}
.nd-c-time {
  font-size: 0.75rem;
  color: var(--text-tertiary, #9CA3AF);
}
.nd-c-text {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary, #374151);
  word-break: break-word;
  white-space: normal;
}
.nd-c-meta {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-tertiary, #9CA3AF);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.nd-c-reply-btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary, #2563EB);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.nd-c-reply-btn:hover { text-decoration: underline; }

/* ── 楼中楼 ── */
.nd-replies {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--border, #E5E7EB);
}
.nd-replies:empty { display: none; }
.nd-reply {
  padding: 9px 0;
  border-top: 1px dashed #F1F5F9;
}
.nd-reply:first-child { border-top: none; padding-top: 2px; }
.nd-r-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.nd-r-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
}
.nd-r-time { font-size: 0.6875rem; color: var(--text-tertiary, #9CA3AF); }
.nd-r-text {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-secondary, #374151);
  word-break: break-word;
}
.nd-r-meta {
  margin-top: 3px;
  font-size: 0.6875rem;
  color: var(--text-tertiary, #9CA3AF);
}

/* 行内回复框 */
.nd-reply-form {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border, #E5E7EB);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nd-reply-form[hidden] { display: none; }
.nd-r-nick {
  width: 180px;
  max-width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
}
.nd-r-textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.7;
  font-family: inherit;
  background: #fff;
}
.nd-r-nick:focus, .nd-r-textarea:focus {
  outline: none;
  border-color: var(--primary, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.nd-r-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.nd-r-cancel {
  border: none;
  background: none;
  color: var(--text-tertiary, #6B7280);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 4px;
}
.nd-r-send {
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary, #2563EB);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.nd-r-send:disabled { opacity: .55; cursor: default; }
.nd-r-msg { font-size: 0.75rem; line-height: 1.6; min-height: 0; }
.nd-r-msg.err { color: #DC2626; }
.nd-r-msg.ok { color: #059669; }
.nd-r-msg.wait { color: #B45309; }

.nd-c-empty {
  padding: 28px 0;
  text-align: center;
  color: var(--text-tertiary, #9CA3AF);
  font-size: 0.875rem;
}
.nd-c-loadmore {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  background: #F9FAFB;
  color: var(--text-secondary, #4B5563);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
}

/* ── 移动端 ── */
@media (max-width: 640px) {
  .nd-actions { gap: 8px; margin: 26px 0 4px; }
  .nd-act {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 6px;
    min-height: 44px;
    font-size: 0.8125rem;
    gap: 6px;
  }
  .nd-act svg { width: 17px; height: 17px; }
  .nd-act-count { font-size: 0.75rem; }
  .nd-comments { padding: 20px 16px 14px; border-radius: 14px; margin-top: 30px; }
  .nd-cf-nick { width: 100%; }
  .nd-toast { bottom: 120px; }
}
