/* 等待、流式与最终回复共用消息外壳，宽度由消息的布局类型决定。 */
.reply-pending { display: block; width: 100%; min-width: 0; }
.reply-waiting { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.reply-pending [hidden] { display: none !important; }
.reply-stream { min-width: 0; color: var(--text-primary, #30303b); }
.reply-stream-text { overflow-wrap: anywhere; }
.reply-stream-text[data-reply-format="text"] { white-space: pre-wrap; }
.reply-stream-text > :first-child { margin-top: 0; }
.reply-stream-text > :last-child { margin-bottom: 0; }
.reply-stream-text:empty { display: none; }
.message-pending .is-streaming .reply-stream-text { position: relative; }
.message-pending .is-streaming .reply-stream-text::after {
    content: ""; position: absolute; display: inline-block; width: 5px; height: 13px; bottom: .35em;
    margin-left: 4px; border-radius: 3px; background: #ce9273;
    animation: stream-caret 1s ease-in-out infinite;
}
.stream-card-placeholder { margin-top: 16px; }
.stream-card-label { display: block; margin-bottom: 9px; color: #8b8791; font-size: 12px; }
.stream-card-preview { margin-top: 14px; min-width: 0; }
.stream-save-note { display: block; margin-top: 12px; color: #8b8791; font-size: 11px; }
.message[data-reply-layout="panel"] .stream-save-note { min-height: 18px; line-height: 18px; }
.message-pending .message-actions { visibility: hidden; pointer-events: none; }
.stream-skeleton-card {
    display: flex; align-items: center; gap: 14px; padding: 16px;
    border: 1px solid #ebeaf0; border-radius: 16px; background: #fff; min-width: 0;
}
.stream-skeleton-image, .stream-skeleton-lines span {
    display: block; background: linear-gradient(100deg, #f3f2f5 25%, #faf9fb 45%, #f3f2f5 65%);
    background-size: 220% 100%; animation: stream-shimmer 1.8s ease-in-out infinite;
    border-radius: 6px;
}
.stream-skeleton-image { width: 62px; height: 62px; flex-shrink: 0; border-radius: 11px; }
.stream-skeleton-lines { flex: 1; min-width: 0; }
.stream-skeleton-lines span { height: 10px; margin: 8px 0; }
.stream-skeleton-lines span:nth-child(2) { width: 74%; }
.stream-skeleton-lines span:nth-child(3) { width: 36%; }
@keyframes stream-shimmer { to { background-position: -220% 0; } }
@keyframes stream-caret { 50% { opacity: .25; } }
@media (max-width: 600px) {
    .stream-card-placeholder { margin-top: 12px; }
    .stream-skeleton-card { padding: 12px; gap: 12px; }
    .stream-skeleton-image { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
    .reply-stream-text::after, .stream-skeleton-image, .stream-skeleton-lines span { animation: none; }
}
