.messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 20px 12px; }
.chat-notice { flex-shrink: 0; font-size: 11px; text-align: center; color: #45697b; padding: 7px 12px; border-radius: 10px; background: #eaf6fa; margin: 10px 20px 0; border: 1px solid #d6e9f2; }
.message-content { max-width: 82%; min-width: 0; }
.message-author { font-size: 12px; color: var(--muted); margin: 0 0 5px 2px; }
.bubble { background: white; border: 1px solid #e8f0f4; border-radius: 15px 15px 15px 4px; padding: 10px 13px; font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.6; border-color: #dce8ee; }
.message-time { font-size: 11px; color: var(--muted); margin: 4px 2px 0; }
.mine .bubble { background: linear-gradient(120deg, #e0f2ff, #def8ef); border: 0; border-radius: 15px 15px 4px 15px; }
.mine .message-author, .mine .message-time { text-align: right; }
.composer { flex-shrink: 0; display: flex; flex-direction: column; gap: 9px; background: white; border-top: 1px solid var(--line); padding: 9px 17px max(12px, env(safe-area-inset-bottom)); }
.composer-row { display: flex; gap: 9px; align-items: flex-end; }
.composer textarea { flex: 1; min-width: 0; height: 45px; min-height: 45px; max-height: 110px; border: 1px solid #e6eef2; background: #f7fbfd; border-radius: 14px; resize: none; padding: 11px 13px; line-height: 1.4; border-color: #c3d8e3; }
.send-button { flex: 0 0 auto; width: 45px; height: 45px; border-radius: 14px; color: white; background: var(--gradient); display: grid; place-items: center; }

@media (min-width: 960px) {
  #detail-dialog .messages { padding: 20px 26px; }
  #detail-dialog .composer { padding: 12px 22px 16px; }
}

@media (min-width: 960px) and (max-height: 760px) {
  #detail-dialog .composer { padding: 8px 18px; gap: 6px; }
}

@media (max-width: 959px) {
  #detail-dialog .chat-notice { margin: 7px 12px 0; padding: 5px 8px; }
}
