/* 互动：点赞 + 留言
   配色沿用主站（米白 / 大地棕 / 墨绿 / 淡金） */

/* ---- 互动条 ---- */
.rn-act {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.rn-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
  -webkit-tap-highlight-color: transparent;
}
.rn-btn:hover { background: var(--bg-alt); }
.rn-btn em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
}
.rn-btn svg { width: 15px; height: 15px; display: block; }

/* 点赞：未赞是空心，赞过变实心红棕 */
.rn-like .rn-heart { fill: none; stroke: currentColor; stroke-width: 1.7; transition: fill .18s, stroke .18s; }
.rn-like.is-on { color: #c2564b; background: #fbeeec; border-color: #f3d9d4; }
.rn-like.is-on .rn-heart { fill: #c2564b; stroke: #c2564b; }
.rn-like.is-on:hover { background: #f8e5e1; }
.rn-like.pop svg { animation: rn-pop .42s cubic-bezier(.3,1.5,.5,1); }
@keyframes rn-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.42); }
  60%  { transform: scale(.92); }
  100% { transform: scale(1); }
}
.rn-cmt.is-open { color: var(--brown-700); background: var(--gold-soft); border-color: var(--line); }

/* ---- 留言区 ---- */
.rn-box {
  margin-top: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 15px 13px;
}
.rn-box[hidden] { display: none; }

.rn-list { display: flex; flex-direction: column; gap: 12px; }
.rn-empty {
  font-size: 13px; color: var(--ink-faint); text-align: center;
  padding: 6px 0 10px; margin: 0;
}
.rn-item {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: 10px 13px 11px;
  position: relative;
}
.rn-item.is-author {
  border-color: #e3d3ae;
  background: #fdf8ec;
}
.rn-item-hd {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.rn-name {
  font-size: 13px; font-weight: 600; color: var(--brown-900);
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rn-badge {
  font-size: 10.5px; letter-spacing: .04em;
  background: var(--gold); color: #fffdf8;
  border-radius: 4px; padding: 1px 5px; line-height: 1.5;
}
.rn-time { font-size: 11.5px; color: var(--ink-faint); margin-left: auto; }
.rn-text {
  font-size: 14.2px; line-height: 1.75; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; margin: 0;
}
.rn-del {
  position: absolute; top: 6px; right: 8px;
  width: 20px; height: 20px; line-height: 1;
  border: none; background: transparent; cursor: pointer;
  color: var(--ink-faint); font-size: 15px; border-radius: 50%;
  opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.rn-item:hover .rn-del { opacity: 1; }
.rn-del:hover { color: #b0463a; background: #fbeeec; }
.rn-item.is-hidden { opacity: .5; }

/* ---- 留言表单 ---- */
.rn-form { margin-top: 13px; }
.rn-fields { display: flex; gap: 8px; margin-bottom: 8px; }
.rn-input,
.rn-ta {
  width: 100%;
  font-family: inherit; font-size: 14px; line-height: 1.7; color: var(--ink);
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.rn-input { width: 168px; flex: none; }
.rn-input:focus,
.rn-ta:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.rn-ta { min-height: 62px; resize: vertical; }
.rn-ta::placeholder,
.rn-input::placeholder { color: var(--ink-faint); }
.rn-fx {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.rn-tip {
  font-size: 12.5px; color: var(--clay); flex: 1;
  min-height: 1em; line-height: 1.5;
}
.rn-tip.ok { color: var(--green-600); }
.rn-count { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.rn-send {
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 8px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; background: var(--brown-900); color: #fffdf8;
  transition: background .16s, transform .16s, opacity .16s;
}
.rn-send:hover:not(:disabled) { background: var(--brown-700); transform: translateY(-1px); }
.rn-send:disabled { opacity: .5; cursor: default; transform: none; }

@media (max-width: 560px) {
  .rn-fields { flex-direction: column; }
  .rn-input { width: 100%; }
  .rn-del { opacity: 1; }
  .rn-name { max-width: 48%; }
}
