/* 留言區（搭配 front.css 的色彩變數） */
.cmt-form { display: flex; gap: 12px; align-items: flex-start; }
.cmt-form textarea { resize: vertical; min-height: 48px; }
.cmt-form-bar { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cmt-link-input { margin-top: 8px; }
.cmt-attach-preview { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.cmt-attach-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.cmt-attach-preview .progress { width: 140px; height: 6px; }
.cmt-reply-form { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }

.cmt { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.cmt-list > .cmt:first-child { border-top: 0; padding-top: 4px; }
.cmt-avatar { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px; object-fit: cover; background: var(--surface-2); }
.cmt-main { flex: 1 1 auto; min-width: 0; }
.cmt-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .84rem; color: var(--text-3); }
.cmt-name { font-weight: 700; color: var(--text); text-decoration: none; }
a.cmt-name:hover { color: var(--brand-soft-text); }
.cmt-time { color: var(--text-3); text-decoration: none; }
.cmt-time:hover { text-decoration: underline; color: var(--text-2); }
.cmt-edited { font-size: .78rem; }
.cmt-body { margin: 4px 0 6px; line-height: 1.75; word-break: break-word; overflow-wrap: anywhere; }
.cmt-removed { margin: 4px 0 0; color: var(--text-3); font-style: italic; font-size: .92rem; }
.cmt-image { display: inline-block; margin: 2px 0 6px; }
.cmt-image img { max-width: min(280px, 100%); max-height: 280px; border-radius: 12px; border: 1px solid var(--line); }
.cmt-link { font-size: .88rem; margin-bottom: 6px; display: flex; gap: 4px; align-items: center; }
.cmt-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.cmt-actions .btn-vote { padding: .2rem .65rem; font-size: .8rem; }
.cmt-actions .btn-link { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.cmt-actions .btn-link:hover { color: var(--text); }

.cmt-replies { margin-top: 4px; padding-left: 12px; border-left: 2px solid var(--line); }
.cmt-replies:empty { display: none; }
.cmt-replies.is-collapsed > .cmt-reply:nth-child(n+4) { display: none; }
.cmt-reply { padding: 10px 0 0; border-top: 0; }
.cmt-reply .cmt-avatar { width: 30px; height: 30px; flex-basis: 30px; }

.cmt-pinned { border-radius: 16px; padding: 6px 14px 4px; margin-bottom: 14px; background: linear-gradient(120deg, var(--surface-2), color-mix(in srgb, var(--brand-soft) 55%, var(--surface-2))); }
.cmt-pinned-title { font-weight: 800; font-size: .9rem; padding-top: 8px; }
.cmt-pinned .cmt { border-top-color: var(--line); }
.cmt-pinned .cmt:first-of-type { border-top: 0; }
.cmt-located { border-radius: 16px; background: var(--surface-2); padding: 4px 12px; margin-bottom: 10px; }
.cmt-located-label { font-size: .8rem; font-weight: 700; color: var(--brand-soft-text); padding-top: 8px; }
@keyframes cmt-flash { from { background: var(--brand-soft); } to { background: transparent; } }
.cmt-flash > .cmt-main > .cmt-content { animation: cmt-flash 2.2s ease-out; border-radius: 10px; }
@media (max-width: 575.98px) {
  .cmt-form > .cmt-avatar { display: none; }
  .cmt-replies { padding-left: 8px; }
}
