/* LoadDone — Messages (driver <-> dispatch) v1.0.0 */

.dm-backdrop {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(15, 18, 25, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.dm-backdrop[hidden] { display: none; }
@media (min-width: 720px) {
  .dm-backdrop { align-items: center; padding: 24px; }
}
.dm-sheet {
  background: #fff; width: 100%; max-width: 560px; height: 92dvh;
  border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  overflow: hidden;
}
@media (min-width: 720px) {
  .dm-sheet { border-radius: 20px; height: min(760px, 88vh); }
}
.dm-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid #eef0f3;
  background: #fff; flex: none;
}
.dm-back {
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; border-radius: 12px;
  color: #1a1d23; flex: none;
}
.dm-back:active { background: #f0f1f4; }
.dm-head-tx h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.dm-head-tx span { font-size: 0.82rem; color: #5b6470; }
.dm-list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px; background: #f6f7f9;
  display: flex; flex-direction: column; gap: 10px;
}
.dm-empty { text-align: center; color: #5b6470; margin: auto; font-size: 0.95rem; line-height: 1.5; }
.dm-row { display: flex; }
.dm-row.mine { justify-content: flex-end; }
.dm-bubble {
  max-width: 82%; background: #fff; border: 1px solid #e3e6eb;
  border-radius: 16px 16px 16px 4px; padding: 10px 12px;
}
.dm-row.mine .dm-bubble {
  background: #e90032; border-color: #e90032; color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.dm-from { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #e90032; margin-bottom: 3px; }
.dm-bubble p { margin: 0; font-size: 0.95rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.dm-time { display: block; font-size: 0.7rem; color: #8a929e; margin-top: 5px; text-align: right; }
.dm-row.mine .dm-time { color: rgba(255, 255, 255, 0.75); }
.dm-err {
  flex: none; margin: 0; padding: 10px 16px;
  background: #fdf0f0; color: #b3261e; font-size: 0.88rem; font-weight: 600;
}
.dm-err[hidden] { display: none; }
.dm-composer {
  flex: none; display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #eef0f3; background: #fff; margin: 0;
}
.dm-input {
  flex: 1; font-size: 16px; font-family: inherit; line-height: 1.4;
  border: 1.5px solid #e3e6eb; border-radius: 14px; padding: 11px 13px;
  resize: none; max-height: 120px; background: #fff; color: #14161a;
}
.dm-input:focus { border-color: #e90032; outline: none; box-shadow: 0 0 0 3px rgb(233 0 50 / 12%); }
.dm-send {
  flex: none; border: 0; cursor: pointer; min-height: 46px; padding: 0 20px;
  border-radius: 999px; background: #e90032; color: #fff;
  font-size: 0.95rem; font-weight: 700; font-family: inherit;
}
.dm-send:disabled { opacity: 0.55; cursor: default; }
.dm-send:active { background: #b60623; }
.dm-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #e90032; flex: none;
}
.dm-dot[hidden] { display: none; }
