


#dm-guest {
  flex: 1; min-height: 0; height: calc(100vh - 107px); margin: 91px 16px 16px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 16px; padding: 2rem; position: relative; z-index: 1;
  border: 1px solid var(--glass-border); border-radius: 20px;
  background: rgba(9,9,9,.4); box-shadow: 0 24px 60px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
}
#dm-guest::before {
  content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
  filter: blur(20px); z-index: -1;
}
#dm-guest i {
  color: var(--text); width: 30px; height: 30px; padding: 18px; border-radius: 50%;
  background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
}
#dm-guest h1 { font-size: 1.4rem; font-weight: 850; font-family: 'Outfit', sans-serif; letter-spacing: -0.015em; }
#dm-guest p { color: var(--text-muted); max-width: 420px; font-size: .9rem; line-height: 1.55; }


#dm-page {
  display: flex; width: auto; margin: 91px 16px 16px 0; height: calc(100vh - 107px);
  position: relative; z-index: 1; border: 1px solid var(--glass-border);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
}


#dm-sidebar {
  width: 308px; flex-shrink: 0; border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column; background: rgba(9, 9, 9, 0.66);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  position: relative;
}
.dm-sidebar-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 1.4rem 1.15rem 1rem; flex-shrink: 0; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 100%);
  border-bottom: 1px solid var(--glass-border);
}
.dm-sidebar-head h1 {
  font-size: 1.05rem; font-weight: 850; font-family: 'Outfit', sans-serif; letter-spacing: -0.015em;
  display: flex; align-items: center; gap: 10px;
}
.dm-sidebar-head h1 i {
  color: var(--bg); width: 15px; height: 15px; padding: 6px; border-radius: 9px;
  background: var(--grad); box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
#dm-add-btn {
  width: 33px; height: 33px; border-radius: 50%; background: var(--glass);
  border: 1px solid var(--glass-border); color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .2s; flex-shrink: 0;
}
#dm-add-btn:hover {
  color: var(--on-light); border-color: transparent; background: var(--grad);
  transform: rotate(90deg) scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,.4);
}

.dm-conversation-list { flex: 1; overflow-y: auto; padding: .7rem .7rem 1.1rem; display: flex; flex-direction: column; gap: 3px; }
.dm-list-empty {
  padding: 3rem 1.3rem; text-align: center; color: var(--text-muted); font-size: .84rem; line-height: 1.6;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}

.dm-conv-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: none; border: 1px solid transparent; text-align: left; cursor: pointer; color: var(--text-dim);
  width: 100%; transition: background .18s ease, border-color .18s ease, transform .18s ease; font-family: inherit;
}
.dm-conv-item:hover { background: rgba(255,255,255,.05); transform: translateX(1px); }
.dm-conv-item.active {
  background: linear-gradient(90deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
  border-color: rgba(255,255,255,.16); color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
}
.dm-conv-item.active::before {
  content: ''; position: absolute; left: -6px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 62%; border-radius: 3px; background: var(--grad);
  box-shadow: 0 0 10px rgba(255,255,255,.35);
}
.dm-conv-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .88rem; font-weight: 750; color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.06), 0 3px 10px rgba(0,0,0,.35);
  transition: box-shadow .18s ease;
}
.dm-conv-item:hover .dm-conv-avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.16), 0 3px 10px rgba(0,0,0,.4); }
.dm-conv-item.active .dm-conv-avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 4px 14px rgba(0,0,0,.4); }
.dm-conv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dm-conv-name { font-size: .88rem; font-weight: 720; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-conv-preview { font-size: .77rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-conv-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px; background: var(--grad);
  color: var(--on-light); font-size: .66rem; font-weight: 850; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; box-shadow: 0 2px 10px rgba(255,255,255,.15), 0 3px 8px rgba(0,0,0,.4);
}


#dm-main {
  flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative;
  background:
    radial-gradient(circle at 15% 8%, rgba(255,255,255,.035), transparent 45%),
    radial-gradient(circle at 85% 92%, rgba(255,255,255,.03), transparent 45%),
    var(--bg2);
}

#dm-thread-head {
  display: flex; align-items: center; gap: 12px; padding: 1rem 1.6rem;
  border-bottom: 1px solid var(--glass-border); flex-shrink: 0; min-height: 32px;
  background: rgba(9,9,9,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  position: relative; z-index: 2;
}
#dm-thread-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}
.dm-thread-avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 750; color: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 4px 12px rgba(0,0,0,.35);
}
.dm-thread-username { font-weight: 780; font-size: .95rem; font-family: 'Outfit', sans-serif; letter-spacing: -0.008em; }


.dm-thread-head-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.dm-thread-head-actions button {
  width: 33px; height: 33px; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .18s;
}
.dm-thread-head-actions button:hover {
  color: var(--on-light); border-color: transparent; background: var(--grad);
  transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.35);
}


.dm-search-panel {
  flex-direction: column; border-bottom: 1px solid var(--glass-border); background: rgba(9, 9, 9, 0.7);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  flex-shrink: 0; max-height: 46vh; position: relative; z-index: 2;
}
.dm-search-bar { display: flex; align-items: center; gap: 8px; padding: .85rem 1.6rem; color: var(--text-dim); }
.dm-search-bar input {
  flex: 1; background: rgba(0,0,0,.35); border: 1px solid var(--glass-border); border-radius: 22px;
  padding: 9px 17px; color: var(--text); font-size: .84rem; outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.dm-search-bar input:focus { border-color: rgba(255,255,255,.4); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.dm-search-bar button {
  width: 29px; height: 29px; border-radius: 50%; background: none; border: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color .15s;
}
.dm-search-bar button:hover { color: var(--text); }
.dm-search-results { overflow-y: auto; padding: 0 1rem .9rem; display: flex; flex-direction: column; gap: 5px; }
.dm-search-status { padding: .9rem 1.2rem; text-align: center; color: var(--text-muted); font-size: .82rem; }
.dm-search-result {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: rgba(255,255,255,.03); border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px 14px;
  cursor: pointer; text-align: left; color: var(--text-dim); font-family: inherit; transition: all .18s;
}
.dm-search-result:hover { border-color: rgba(255,255,255,.3); color: var(--text); background: rgba(255,255,255,.06); transform: translateX(2px); }
.dm-search-result-text { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dm-search-result-date { font-size: .7rem; color: var(--text-muted); flex-shrink: 0; }


.dm-load-more {
  align-self: center; background: rgba(255,255,255,.045); border: 1px solid var(--glass-border); border-radius: 18px;
  color: var(--text-dim); font-size: .78rem; font-weight: 680; padding: 8px 20px; cursor: pointer; transition: all .18s; margin-bottom: 6px;
  font-family: inherit;
}
.dm-load-more:hover { color: var(--on-light); border-color: transparent; background: var(--grad); box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.dm-load-more:disabled { opacity: .55; cursor: default; background: rgba(255,255,255,.045); color: var(--text-dim); box-shadow: none; }


.dm-date-sep { display: flex; align-items: center; justify-content: center; margin: 12px 0; align-self: center; gap: 10px; }
.dm-date-sep span {
  font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); background: rgba(255,255,255,.045); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 5px 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}


.dm-read-tick { display: inline-flex; color: var(--text-muted); }
.dm-read-tick.read { color: var(--blue-light); filter: drop-shadow(0 0 4px rgba(231,231,236,.5)); }


@keyframes dm-highlight-flash {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 3px var(--blue-light), 0 0 24px rgba(231,231,236,.35); }
}
.dm-highlight .dm-bubble { animation: dm-highlight-flash 1.7s ease; border-radius: 18px; }

.dm-thread {
  flex: 1; overflow-y: auto; padding: 1.8rem 1.8rem 1.3rem; display: flex; flex-direction: column; gap: 13px;
  background-repeat: no-repeat; transition: background-color .25s ease; position: relative; z-index: 1;
}
.dm-thread.dm-thread-themed { background-color: transparent; }

@keyframes dm-bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dm-bubble-row { animation: dm-bubble-in .28s cubic-bezier(.2,.8,.3,1) both; }


#dm-thread-head { position: relative; }
.dm-theme-panel {
  position: absolute; top: calc(100% + 10px); right: 1.5rem; z-index: 20; width: 264px;
  background: rgba(9, 9, 9, 0.98); border: 1px solid var(--glass-border); border-radius: 18px;
  padding: 15px; box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.dm-theme-panel-title { font-size: .84rem; font-weight: 780; color: var(--text); margin-bottom: 11px; font-family: 'Outfit', sans-serif; }
.dm-theme-panel-hint { font-weight: 500; color: var(--text-muted); font-size: .74rem; }
.dm-theme-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.dm-theme-swatch {
  width: 100%; aspect-ratio: 1; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  transition: transform .18s, border-color .18s, box-shadow .18s; padding: 0;
}
.dm-theme-swatch:hover { transform: scale(1.12); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.dm-theme-swatch.active { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 4px 12px rgba(0,0,0,.4); }
.dm-theme-panel-actions { margin-top: 13px; display: flex; }
.dm-theme-custom-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: rgba(255,255,255,.045); border: 1px solid var(--glass-border); border-radius: 13px;
  color: var(--text-dim); font-size: .78rem; font-family: inherit; padding: 9px 10px; cursor: pointer; transition: all .18s;
}
.dm-theme-custom-btn:hover { color: var(--on-light); border-color: transparent; background: var(--grad); }
@media (max-width: 720px) {
  .dm-theme-panel { right: 1rem; left: 1rem; width: auto; }
}
.dm-thread-loading, .dm-thread-empty {
  margin: auto; text-align: center; color: var(--text-muted); display: flex; flex-direction: column;
  align-items: center; gap: 12px; font-size: .89rem; max-width: 320px; line-height: 1.55;
}

.dm-bubble-line { display: flex; align-items: flex-end; gap: 9px; max-width: 68%; align-self: flex-start; }
.dm-bubble-line.mine { flex-direction: row-reverse; align-self: flex-end; }
.dm-bubble-avatar {
  width: 29px; height: 29px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  background: var(--glass); color: var(--text); font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 2px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.3);
}
.dm-bubble-row {
  display: flex; flex-direction: column; max-width: 100%; gap: 4px;
  position: relative; min-width: 0;
}
.dm-bubble-row.mine { align-items: flex-end; }
.dm-bubble-wrap { display: flex; align-items: center; gap: 6px; }
.dm-bubble-row.mine .dm-bubble-wrap { flex-direction: row-reverse; }
.dm-bubble {
  padding: 11px 16px; border-radius: 19px; background: rgba(255,255,255,.045);
  border: 1px solid var(--glass-border);
  font-size: .87rem; line-height: 1.5; word-break: break-word; white-space: pre-wrap; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 2px 8px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: box-shadow .15s ease;
}
.dm-bubble-row.mine .dm-bubble {
  background: var(--grad); color: var(--on-light); border-color: transparent;
  box-shadow: 0 6px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.4);
}
.dm-bubble.deleted { font-style: italic; opacity: .6; background: transparent; border-style: dashed; box-shadow: none; }
.dm-bubble-row.mine .dm-bubble.deleted { background: transparent; color: var(--text-muted); border: 1px dashed var(--glass-border); box-shadow: none; }
.dm-bubble-img {
  max-width: 270px; max-height: 270px; border-radius: 16px; display: block; cursor: pointer;
  border: 1px solid var(--glass-border); object-fit: cover; box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.dm-bubble-img:hover { transform: scale(1.015); box-shadow: 0 8px 26px rgba(0,0,0,.45); }
.dm-bubble-img + .dm-bubble { margin-top: 6px; }
.dm-bubble-time { font-size: .68rem; color: var(--text-muted); padding: 0 4px; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.dm-bubble-edited { font-style: italic; opacity: .8; }


.dm-bubble-actions {
  display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .18s, transform .18s;
  background: rgba(11,11,11,.9); border: 1px solid var(--glass-border); border-radius: 22px; padding: 3px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transform: translateY(2px);
}
.dm-bubble-row:hover .dm-bubble-actions, .dm-bubble-actions.force-visible { opacity: 1; transform: translateY(0); }
.dm-bubble-actions button {
  width: 27px; height: 27px; border-radius: 50%; background: none; border: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.dm-bubble-actions button:hover { background: rgba(255,255,255,.12); color: var(--text); transform: scale(1.08); }
.dm-bubble-actions button.danger:hover { color: #f87171; background: rgba(248,113,113,.12); }


.dm-reaction-picker {
  position: absolute; bottom: calc(100% + 8px); display: flex; gap: 2px; padding: 6px 7px;
  background: rgba(9,9,9,.97); border: 1px solid var(--glass-border); border-radius: 22px;
  box-shadow: 0 10px 28px rgba(0,0,0,.5); z-index: 5; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: dm-bubble-in .16s ease both;
}
.dm-bubble-row.mine .dm-reaction-picker { right: 0; }
.dm-bubble-row:not(.mine) .dm-reaction-picker { left: 0; }
.dm-reaction-picker button {
  width: 29px; height: 29px; border-radius: 50%; background: none; border: none; font-size: 1.05rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .14s, background .14s;
}
.dm-reaction-picker button:hover { transform: scale(1.3); background: rgba(255,255,255,.08); }


.dm-reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.dm-reaction-chip {
  display: flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 13px;
  background: rgba(255,255,255,.045); border: 1px solid var(--glass-border); font-size: .74rem; color: var(--text-dim);
  cursor: pointer; transition: all .18s;
}
.dm-reaction-chip:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); transform: translateY(-1px); }
.dm-reaction-chip.mine { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.42); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.25); }


.dm-edit-form { display: flex; gap: 7px; width: 100%; }
.dm-edit-input {
  flex: 1; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.35); border-radius: 15px;
  padding: 10px 14px; color: var(--text); font-size: .87rem; outline: none; font-family: inherit; resize: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.05);
}
.dm-edit-actions { display: flex; gap: 5px; }
.dm-edit-actions button {
  width: 31px; height: 31px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform .15s, box-shadow .15s;
}
.dm-edit-actions button:hover { transform: scale(1.09); }
.dm-edit-save { background: var(--grad); color: var(--on-light); box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.dm-edit-cancel { background: var(--glass); color: var(--text-muted); border: 1px solid var(--glass-border); }


.dm-typing-indicator {
  display: flex; align-items: center; gap: 9px; padding: 0 1.8rem .7rem; font-size: .78rem;
  color: var(--text-muted); flex-shrink: 0;
}
.dm-typing-dots {
  display: inline-flex; gap: 4px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 7px 11px;
}
.dm-typing-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: var(--text-dim);
  animation: dm-typing-bounce 1.2s infinite ease-in-out;
}
.dm-typing-dots span:nth-child(2) { animation-delay: .15s; }
.dm-typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dm-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }


.dm-image-preview {
  display: flex; align-items: center; gap: 11px; padding: .8rem 1.8rem; border-top: 1px solid var(--glass-border);
  flex-shrink: 0; background: rgba(9,9,9,.45);
}
.dm-image-preview img { max-height: 66px; border-radius: 12px; border: 1px solid var(--glass-border); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.dm-image-preview button {
  width: 27px; height: 27px; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .18s;
}
.dm-image-preview button:hover { color: #f87171; border-color: #f87171; background: rgba(248,113,113,.1); }


.dm-lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 999; display: flex;
  align-items: center; justify-content: center; cursor: zoom-out; padding: 2rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: dm-bubble-in .2s ease both;
}
.dm-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.65); }


.dm-bubble-row, .dm-thread-avatar, .dm-thread-username, .dm-conv-item { cursor: pointer; }
.dm-bubble-row .dm-bubble, .dm-bubble-row .dm-bubble-img { cursor: default; }


.dm-reply-banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 1.8rem; margin: 0 0 -2px;
  border-top: 1px solid var(--glass-border); background: rgba(255,255,255,.035); color: var(--text-dim); font-size: .8rem;
  position: relative;
}
.dm-reply-banner::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.dm-reply-banner-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-reply-banner-text strong { color: var(--text); }
.dm-reply-banner button {
  width: 25px; height: 25px; border-radius: 50%; background: none; border: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color .15s;
}
.dm-reply-banner button:hover { color: #f87171; }


#dm-send-form {
  display: flex; align-items: center; gap: 11px; padding: 1.15rem 1.8rem; border-top: 1px solid var(--glass-border);
  flex-shrink: 0; background: rgba(9,9,9,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  position: relative; z-index: 2;
}
#dm-input {
  flex: 1; background: rgba(0,0,0,.32); border: 1px solid var(--glass-border); border-radius: 26px;
  padding: 13px 21px; color: var(--text); font-size: .88rem; outline: none; transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
#dm-input::placeholder { color: var(--text-muted); }
#dm-input:focus { border-color: rgba(255,255,255,.42); box-shadow: 0 0 0 4px rgba(255,255,255,.07), 0 4px 16px rgba(0,0,0,.25); }
#dm-image-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .18s;
}
#dm-image-btn:hover { color: var(--on-light); border-color: transparent; background: var(--grad); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
#dm-send-form button[type="submit"] {
  width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: var(--on-light);
  border: none; display: flex; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0; transition: transform .18s, box-shadow .18s; box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
#dm-send-form button[type="submit"]:hover { transform: scale(1.08) rotate(-4deg); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
#dm-send-form button[type="submit"]:active { transform: scale(.96); }



@media (max-width: 900px) {
  
  #dm-page, #dm-guest {
    margin: 75px 0 0; height: calc(100vh - 75px); border-radius: 0;
    border-left: none; border-right: none; border-bottom: none; box-shadow: none;
  }
}
@media (max-width: 720px) {
  #dm-page { flex-direction: column; height: calc(100vh - 75px); }
  #dm-sidebar { width: 100%; height: 38%; border-right: none; border-bottom: 1px solid var(--glass-border); }
  #dm-main { flex: 1; min-height: 0; }
  .dm-bubble-line { max-width: 88%; }
  #dm-thread, #dm-send-form, #dm-thread-head, .dm-typing-indicator, .dm-image-preview, .dm-search-bar, .dm-search-results {
    padding-left: 1.1rem; padding-right: 1.1rem;
  }
}
