/* The chat is a focused layer above the preserved friend list. */
#xj-dm-dialog {
  box-sizing: border-box;
  padding: 0;
  color: #eee2cf;
  background: #12100d;
  border: 1px solid rgba(219,191,152,.32);
  border-radius: 20px;
  width: min(760px, calc(100vw - 48px));
  max-width: none;
  height: min(760px, calc(var(--dm-height, 100dvh) - 48px));
  max-height: none;
  margin: auto;
  overflow: hidden;
  box-shadow: 0 28px 100px rgba(0,0,0,.55);
}
#xj-dm-dialog[open] { display: flex; flex-direction: column; }
#xj-dm-dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(5px); }
.xj-dm-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex: 0 0 auto; padding: 12px 16px 12px 22px;
  border-bottom: 1px solid rgba(219,191,152,.18); background: #1a1610;
}
.xj-dm-header > div { min-width: 0; }
.xj-dm-identity { display: flex; align-items: center; gap: 12px; }
.xj-dm-identity > div { min-width: 0; }
#xj-dm-avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; border: 1px solid rgba(219,191,152,.2); }
#xj-dm-title { margin: 0; color: #edcf9c; font-size: 17px; line-height: 1.5; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#xj-dm-person { margin: 1px 0 0; color: #bfb29f; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#xj-dm-close, #xj-dm-retry {
  min-width: 44px; min-height: 44px; flex-shrink: 0; cursor: pointer; color: #efdab5;
  background: rgba(219,191,152,.07); border: 1px solid rgba(219,191,152,.22); border-radius: 12px;
  font: inherit;
}
#xj-dm-close { font-size: 28px; line-height: 1; }
#xj-dm-close:focus-visible, #xj-dm-retry:focus-visible { outline: 2px solid #e3c68e; outline-offset: 2px; }
#xj-dm-retry { padding: 8px 18px; font-size: 16px; }
.xj-dm-body { position: relative; flex: 1; min-height: 0; }
#xj-dm-frame { display: block; width: 100%; height: 100%; border: 0; background: #12100d; }
#xj-dm-status { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: #12100d; color: #cbbb9f; text-align: center; }
#xj-dm-status[hidden] { display: none; }
.xj-dm-open { overscroll-behavior: none; }
@media (max-width: 600px) {
  #xj-dm-dialog { width: 100%; height: var(--dm-height, 100dvh); margin: 0; top: var(--dm-top, 0px); bottom: auto; border: 0; border-radius: 0; }
  .xj-dm-header { padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
  #xj-dm-title { font-size: 16px; }
}
