.chat-row { align-items: center; -webkit-touch-callout: none; user-select: none; touch-action: pan-y; }
.chat-row-main {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}
.chat-row-more {
  width: 27px;
  height: 31px;
  flex: none;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aaa2a0;
  font-size: 21px;
  line-height: 1;
  opacity: .55;
}
.chat-row:hover .chat-row-more, .chat-row-more:focus-visible { opacity: 1; background: var(--surface-accent); color: var(--action-primary); }
.chat-avatar { object-fit: cover; border-radius: 50%; background: var(--action-primary); }
.room-header .chat-avatar { width: 36px; height: 36px; }
.room-header > div { min-width: 0; flex: 1; }
.room-chat-options { border: 0; background: transparent; color: #a5a0a0; font-size: 23px; padding: 4px 8px; margin-left: auto; border-radius: 9px; }
.room-chat-options:hover, .room-chat-options:focus-visible { background: var(--surface-accent); color: var(--action-primary); }
.glass-layer { position: fixed; inset: 0; z-index: 50; }
.glass-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 25, 31, .22);
  backdrop-filter: blur(4px) saturate(1.3);
  -webkit-backdrop-filter: blur(4px) saturate(1.3);
  opacity: 0;
  transition: opacity .2s ease;
}
.glass-panel {
  position: absolute;
  width: 280px;
  padding: 9px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(244, 246, 250, .55));
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .95), 0 22px 55px rgba(48, 41, 38, .2), 0 4px 14px rgba(48, 41, 38, .12);
  color: #2c2d32;
  opacity: 0;
  transform: translateY(12px) scale(.88);
  transform-origin: 20% 25%;
  transition: opacity .22s ease, transform .36s cubic-bezier(.2, 1.4, .42, 1);
  overflow: hidden;
}
.glass-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 15% 0%, rgba(255,255,255,.8), transparent 44%), radial-gradient(circle at 100% 100%, rgba(216,224,250,.24), transparent 50%);
}
.is-open .glass-backdrop { opacity: 1; }
.is-open .glass-panel { opacity: 1; transform: translateY(0) scale(1); }
.is-closing .glass-backdrop { opacity: 0; }
.is-closing .glass-panel { opacity: 0; transform: translateY(8px) scale(.94); transition-duration: .16s; }
.glass-chat, .glass-actions, .glass-cancel { position: relative; z-index: 1; }
.glass-chat { display: flex; align-items: center; gap: 11px; padding: 13px 12px 16px; }
.glass-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover; }
.glass-avatar-default { display: grid; place-items: center; background: var(--action-primary); color: white; font-size: 26px; font-weight: 700; padding-bottom: 5px; }
.glass-chat strong, .glass-chat small { display: block; }
.glass-chat strong { font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 176px; }
.glass-chat small { font-size: 10px; color: #88868b; margin-top: 4px; }
.glass-actions {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 16px;
  background: rgba(255,255,255,.4);
}
.glass-actions button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #3c3c43;
  text-align: left;
  padding: 12px 13px;
  font-size: 13px;
  font-weight: 700;
}
.glass-actions button + button { border-top: 1px solid rgba(110,110,125,.12); }
.glass-actions button:hover, .glass-actions button:focus-visible { background: rgba(255,255,255,.55); }
.glass-actions .glass-danger { color: #d4504c; }
.glass-action-icon { display: grid; place-items: center; width: 24px; font-size: 19px; }
.glass-chevron { margin-left: auto; font-size: 20px; font-weight: 400; opacity: .48; }
.glass-cancel {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 13px;
  background: rgba(255,255,255,.55);
  color: #4d4d57;
  font-size: 12px;
  font-weight: 800;
  padding: 10px;
  margin-top: 7px;
}
.avatar-edit-preview { display: grid; justify-items: center; gap: 14px; padding: 6px 0 14px; }
.avatar-edit-preview .chat-avatar { width: 96px; height: 96px; font-size: 55px; }
.avatar-edit-preview input { width: 100%; }
.modal-danger { color: #c7544f; background: #fff2ef; border-color: #f5d1cb; }
.recalled-message { color: #777; font-style: italic; }
.mine .recalled-message { color: rgba(255,255,255,.86); }
@media (max-width: 720px) {
  .chat-row-more { opacity: 1; }
  .glass-panel {
    width: auto;
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: max(75px, var(--safe-bottom) + 70px);
    border-radius: 28px;
    transform-origin: 50% 100%;
    transform: translateY(24px) scale(.96);
  }
  .glass-chat { padding: 17px 16px 19px; }
  .glass-actions button { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .glass-backdrop, .glass-panel { transition: none; }
}
