.reply-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: #506579;
  font-size: 13px;
  line-height: 20px;
}
.reply-content:not(:empty) + .reply-status { margin-top: 10px; }
.message .reply-content > p { margin: 0 0 10px; }
.message .reply-content > p:last-child { margin-bottom: 0; }
.reply-spinner {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid #cfddd8;
  border-top-color: #287668;
  border-radius: 50%;
  animation: reply-spin .85s linear infinite;
}
.reply-notice { margin-top: 8px; color: #70614c; font-size: 13px; line-height: 20px; }
.compose-row .send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.compose-row .send { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.study-workspace .compose-row .send { min-width: 84px; }
.compose-row .send .send-spinner { flex-basis: 16px; width: 16px; height: 16px; border-color: rgba(255,255,255,.35); border-top-color: currentColor; }
.compose-row .send:disabled { opacity: .55; cursor: wait; }
@keyframes reply-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reply-spinner { animation: none; } }

.chat-attachments { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 10px; max-width: 100%; }
.upload-pill { max-width: min(360px, 100%); box-sizing: border-box; }
.upload-image-preview { flex: 0 0 56px; width: 56px; height: 44px; object-fit: contain; border-radius: 4px; background: #f6f8f9; }
.chat-image { display: flex; flex-direction: column; gap: 6px; width: min(240px, 100%); min-width: 0; padding: 6px; border: 1px solid #cfddd8; border-radius: 10px; background: #fff; color: #243b4c; text-align: left; cursor: zoom-in; }
.chat-image img { display: block; width: 100%; height: 160px; object-fit: contain; border-radius: 5px; background: #f6f8f9; }
.chat-image span { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-file { max-width: 100%; padding: 6px 9px; border: 1px solid #cfddd8; border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }
.chat-image-dialog { width: min(1100px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 24px); padding: 14px; box-sizing: border-box; border: 1px solid #cfddd8; border-radius: 12px; background: #fff; color: #173248; }
.chat-image-dialog::backdrop { background: rgba(10, 23, 38, .7); }
.chat-image-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chat-image-dialog header strong { min-width: 0; overflow-wrap: anywhere; }
.chat-image-dialog button { flex: 0 0 auto; padding: 6px 12px; cursor: pointer; border: 1px solid #cfddd8; border-radius: 7px; background: #f5f8fa; color: #173248; }
.chat-image-dialog > img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 140px); margin: auto; object-fit: contain; }
.chat-image-dialog p:empty { display: none; }
.chat-image:focus-visible, .chat-image-dialog button:focus-visible { outline: 3px solid #3775c9; outline-offset: 2px; }
