/* Shared quiet surfaces for the remaining popup menus, with original handlers. */
html[data-look] :is(#messageMenu,#selectedRoomMenu,.send-options-menu,.attachment-picker,.delivery-dialog){background:var(--d-surface);color:var(--d-ink);border:1px solid var(--d-line);border-radius:14px;box-shadow:0 6px 24px #0002}
html[data-look] #messageMenu .menu-action,html[data-look] #selectedRoomMenu button,html[data-look] .send-options-menu button{color:var(--d-ink);font-size:13px;font-weight:500;min-height:40px;border-radius:8px;background:transparent;box-shadow:none}
html[data-look] #messageMenu .menu-action:hover,html[data-look] #selectedRoomMenu button:hover,html[data-look] .send-options-menu button:hover{background:var(--d-active)}
html[data-look] #messageMenu .menu-action.danger{color:#bd655f}
html[data-look] #selectedRoomMenu .selected-room-title{border-color:var(--d-line);color:var(--d-muted)}
html[data-look] .attachment-picker-options button{border:0;background:var(--d-panel);color:var(--d-ink);border-radius:12px;box-shadow:none}
html[data-look] .attachment-option-icon{background:transparent;color:var(--d-accent)}
html[data-look] dialog .dialog-heading .icon-button{width:36px;min-height:36px;padding:4px;background:transparent;box-shadow:none}
html[data-look] :is(#messageMenu,#selectedRoomMenu,.send-options-menu,.attachment-picker) button:focus-visible{outline:2px solid var(--d-accent);outline-offset:-2px}
@media(max-width:900px){
  html[data-look] #messages{padding:9px 9px}
  html[data-look] #messages .message{padding:4px 8px;margin-bottom:4px;border:0;box-shadow:none;border-radius:11px 11px 11px 4px}
  html[data-look] #messages .message.own{border-radius:11px 11px 4px 11px}
  html[data-look][data-density=compact] #messages .message{padding-top:3px;padding-bottom:3px}
  html[data-look][data-density=spacious] #messages .message{padding-top:7px;padding-bottom:7px}
  html[data-look] #messages .message .body{font-size:15px;line-height:1.4;padding-right:0}
  html[data-look] #messages .message>.meta{padding-right:0;min-height:0;font-size:11px;line-height:1.25;margin-bottom:2px}
  /* Keep the invisible menu anchor geometry used by the existing popup logic. */
  html[data-look] #messages .message>.message-more{visibility:hidden;pointer-events:none}
  html[data-look] #messages .message .message-reply-shortcut{display:none}
  html[data-look] #messages .message .message-footer{margin-top:1px;gap:3px;min-height:0}
  html[data-look] #messages .message .message-mini-time{font-size:10px;line-height:1.2;white-space:nowrap}
  html[data-look] #messages .message .bubble-date-prefix{display:none}
  html[data-look] #messages .message.simple-message{display:flow-root}
  html[data-look] #messages .simple-message>.body{display:inline}
  html[data-look] #messages .simple-message .message-footer{display:inline-flex;vertical-align:bottom;margin-left:8px;margin-top:0}
  html[data-look] #messages .message .read-receipt{min-width:28px;min-height:28px;padding:2px;line-height:1}
  html[data-look] #messages .message .reactions:not(:empty){margin-top:3px}
  html[data-look] #messages .message .reply-quote{padding:4px 7px;margin:2px 0}
  html[data-look] #messages .message .message-avatar{width:26px;height:26px;left:-31px;top:3px}
  html[data-look] #messageMenu[open]{width:min(252px,calc(100vw - 16px));padding:8px}
  html[data-look] #messageMenu #quickReactions button{height:40px}
}
