/* Shared groups use the same conversation surfaces and controls as private chat. */
.frame .shared-groups-pane {
  display:flex; flex-direction:column; position:relative; min-width:0; min-height:0; height:100%;
  background:var(--chat-surface); color:var(--ink);
  font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}
.shared-groups-pane *, .sg-dialog * { box-sizing:border-box; }
.shared-groups-pane[hidden], .shared-groups-pane [hidden], .sg-dialog [hidden] { display:none!important; }
.shared-groups-pane :is(button,input,textarea,select), .sg-dialog :is(button,input,textarea,select) { font:inherit; color:inherit; }
.shared-groups-pane button, .sg-dialog button {
  border:1px solid var(--line); border-radius:6px; background:var(--panel-surface); color:var(--ink);
  padding:6px 12px; min-height:32px; cursor:pointer;
}
.shared-groups-pane button:hover, .sg-dialog button:hover { background:var(--row-hover); }
.shared-groups-pane button:disabled, .sg-dialog button:disabled { opacity:.5; cursor:default; }
.shared-groups-pane :is(button,summary,input,textarea,select,a):focus-visible,
.sg-dialog :is(button,summary,input,textarea,select,a):focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; }
.sg-header { display:flex; align-items:center; gap:12px; min-height:64px; padding:10px 24px; flex:none; border-bottom:1px solid var(--line); background:var(--header-surface); }
.sg-header>div:first-of-type { flex:1; min-width:0; }
.sg-header h1 { font-size:18px; line-height:25px; font-weight:600; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sg-header p { margin:2px 0 0; color:var(--muted); font-size:12px; line-height:18px; }
.sg-header-actions { display:flex; align-items:center; flex:none; gap:6px; }
.sg-header-actions>button, .sg-more>summary { border:0; background:transparent; font-size:13px; padding:6px 10px; white-space:nowrap; }
.sg-more { position:relative; }
.sg-more>summary { list-style:none; border-radius:6px; cursor:pointer; }
.sg-more>summary::-webkit-details-marker { display:none; }
.sg-more>summary:hover { background:var(--row-hover); }
.sg-more-menu { position:absolute; right:0; top:calc(100% + 5px); z-index:3; width:148px; padding:5px; border:1px solid var(--line); border-radius:7px; background:var(--panel-surface); box-shadow:var(--dialog-shadow); }
.sg-more-menu button { display:block; width:100%; border:0; background:transparent; text-align:left; }
.sg-mobile-list { display:none; }
.sg-feedback { flex:none; margin:0; padding:6px 24px; font-size:12px; color:var(--text-secondary); overflow-wrap:anywhere; }
.sg-feedback:empty { display:none; }
.sg-error, .sg-dialog-feedback { color:var(--danger); }
.sg-messages { flex:1; min-height:0; overflow:auto; padding:18px 24px; overscroll-behavior:contain; }
.sg-date-separator { text-align:center; margin:4px 0 18px; color:var(--muted); font-size:11px; line-height:18px; }
.sg-message { display:flex; align-items:flex-start; gap:10px; width:100%; margin:0 0 20px; padding:0; border:0; background:transparent; overflow-wrap:anywhere; }
.sg-message-avatar { display:grid; place-items:center; flex:none; position:relative; overflow:hidden; width:36px; height:36px; border-radius:6px; background:var(--avatar-surface); color:var(--accent); font-size:15px; font-weight:500; }
.sg-message-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.sg-message-body { min-width:0; max-width:min(82%,800px); }
.sg-message-body>header { display:flex; align-items:baseline; gap:10px; min-width:0; margin:0 0 4px; color:var(--muted); font-size:11px; line-height:17px; }
.sg-message-body>header b { font:inherit; overflow-wrap:anywhere; }
.sg-message-bubble { display:inline-block; max-width:100%; padding:9px 12px; border:1px solid var(--bubble-border); border-radius:6px; background:var(--bubble-surface); color:var(--ink); vertical-align:top; }
.sg-message.sg-own { flex-direction:row-reverse; }
.sg-own .sg-message-body { text-align:right; }
.sg-own .sg-message-body>header { justify-content:flex-end; }
.sg-own .sg-message-bubble { text-align:left; background:var(--user-bubble); border-color:var(--user-bubble-border); }
.sg-text { white-space:pre-wrap; line-height:1.65; overflow-wrap:anywhere; margin:0; }
.sg-message-bubble>.sg-text:empty { display:none; }
.sg-message-bubble>.sg-text + :is(.sg-dispatch,.sg-publication) { margin-top:10px; }
.sg-dispatch { border:1px solid var(--line); background:var(--panel-surface); border-radius:6px; margin:10px 0 0; padding:12px; font-size:13px; text-align:left; }
.sg-dispatch>b { font-weight:600; }
.sg-dispatch p { font-size:12px; margin:6px 0; }
.sg-dispatch button { margin:5px 5px 0 0; font-size:12px; }
.sg-dispatch small, .sg-publication small { display:block; overflow-wrap:anywhere; color:var(--muted); font-size:12px; margin:7px 0; }
.sg-composer { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; flex:none; min-width:0; padding:9px 24px 10px; border-top:1px solid var(--line); background:var(--panel-surface); }
.sg-composer textarea { grid-column:1/-1; order:5; display:block; width:100%; resize:none; min-height:100px; max-height:min(220px,32dvh); border:0; border-radius:0; padding:5px 2px 8px; background:transparent; line-height:23px; box-shadow:none; }
.sg-composer textarea:focus-visible { outline:0; }
.sg-composer:focus-within { border-top-color:var(--focus-ring); }
.sg-composer select, .sg-composer input:not([type=file]), .sg-dialog select, .sg-dialog input { border:1px solid var(--line); border-radius:6px; background:var(--field-surface); padding:7px 9px; max-width:100%; min-width:0; }
.sg-composer [data-sg-work-fields] { grid-column:1/-1; order:3; display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:8px 0; font-size:12px; }
.sg-composer [data-sg-work-fields] label { display:flex; align-items:center; gap:7px; min-width:0; }
.sg-composer [data-sg-work-fields] input { flex:1; width:min(280px,100%); }
.sg-mentions, .sg-files { grid-column:1/-1; order:2; display:flex; flex-wrap:wrap; gap:5px; min-width:0; }
.sg-mentions:empty, .sg-files:empty { display:none; }
.sg-mentions button, .sg-files button { font-size:12px; padding:3px 8px; min-height:28px; max-width:100%; overflow-wrap:anywhere; margin-bottom:5px; background:var(--accent-soft); }
.sg-compose-tools { grid-column:1; order:10; display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
.sg-compose-tools>button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-width:32px; min-height:32px; border:0; padding:5px 8px; background:transparent; color:var(--text-secondary); font-size:13px; }
.sg-compose-tools [aria-pressed=true] { color:var(--accent); background:var(--accent-soft); }
.sg-tool-button :is(svg,img), .sg-attachment-icon { display:block; width:21px; height:21px; }
.sg-attachment-icon { background:currentColor; mask:url('/honghub/assets/vendor/tabler/paperclip.svg?v=a6871bc2d888e61901f7cbae78f1dc9690ab27a10ca13353c52dd5eac511374f') center/contain no-repeat; -webkit-mask:url('/honghub/assets/vendor/tabler/paperclip.svg?v=a6871bc2d888e61901f7cbae78f1dc9690ab27a10ca13353c52dd5eac511374f') center/contain no-repeat; }
.sg-send-footer { grid-column:2; order:10; display:flex; align-items:center; gap:12px; min-width:0; }
.sg-send-footer small { color:var(--muted); font-size:11px; white-space:nowrap; }
.sg-send-footer button, .sg-dialog button[type=submit], .sg-confirm [data-sg-confirm-accept] { background:var(--accent); color:var(--primary-ink); border-color:var(--accent); padding-inline:16px; }
.sg-send-footer button:hover, .sg-dialog button[type=submit]:hover, .sg-confirm [data-sg-confirm-accept]:hover { background:var(--accent-hover); border-color:var(--accent-hover); }
.shared-groups-pane>.sg-jump-latest { position:relative; align-self:center; flex:none; margin:-42px 0 10px; z-index:2; border-radius:18px; font-size:12px; background:var(--panel-surface); box-shadow:var(--card-shadow); color:var(--accent); }
.sg-dialog { width:min(570px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--dialog-line); border-radius:10px; color:var(--ink); background:var(--dialog-surface); overflow:auto; box-shadow:var(--dialog-shadow); font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
.sg-dialog::backdrop { background:var(--dialog-backdrop); }
.sg-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 18px; margin:0; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--dialog-surface); z-index:1; }
.sg-dialog h2 { font-size:17px; margin:0; }
.sg-dialog-body { padding:18px; overflow-wrap:anywhere; }
.sg-dialog-body form { display:flex; flex-direction:column; gap:14px; }
.sg-dialog-body label { display:flex; flex-direction:column; gap:6px; }
.sg-dialog-body p { font-size:13px; line-height:1.6; }
.sg-group-settings { display:grid; gap:14px; margin:16px 0; padding:14px; border:1px solid var(--line); border-radius:8px; background:var(--panel-surface); }
.sg-group-settings form { display:grid; gap:7px; }
.sg-group-settings form+form, .sg-group-settings>section+form { padding-top:13px; border-top:1px solid var(--line); }
.sg-group-settings label, .sg-group-settings>section>b { color:var(--ink); font-size:13px; font-weight:600; }
.sg-group-settings textarea { width:100%; min-width:0; resize:vertical; border:1px solid var(--line); border-radius:6px; padding:9px 10px; color:var(--ink); background:var(--field-surface); font:inherit; line-height:1.55; }
.sg-group-settings textarea:focus-visible { outline:2px solid var(--focus-ring); outline-offset:1px; }
.sg-group-settings textarea:disabled { opacity:.65; resize:none; }
.sg-group-settings-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.sg-group-settings-footer small { color:var(--muted); font-size:11px; }
.sg-dialog .sg-group-settings-footer button { min-height:30px; padding:4px 11px; font-size:12px; }
.sg-group-settings [data-sg-settings-status] { min-height:0; margin:0; color:var(--muted); font-size:11px; }
.sg-group-settings [data-sg-settings-status]:empty { display:none; }
.sg-group-settings .sg-group-notice-text { margin:5px 0 0; color:var(--text-secondary); white-space:pre-wrap; overflow-wrap:anywhere; }
.sg-dialog-feedback { padding:0 18px 12px; font-size:12px; }
.sg-search-result { padding:11px 0; border-bottom:1px solid var(--line); }
.sg-search-result>b { font-size:13px; }
.sg-search-result>time { float:right; color:var(--muted); font-size:11px; }
.sg-search-result>p { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--text-secondary); }
.sg-member, .sg-invitation, .sg-publication { padding:12px 0; border-bottom:1px solid var(--line); }
.sg-member { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.sg-member b { flex:1; min-width:100px; }
.sg-member span { font-size:12px; color:var(--muted); }
.sg-dialog-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; }
.sg-recovery p { padding:8px 24px; font-size:12px; color:var(--warning); background:var(--ask-attention-surface); margin:0; }
.sg-empty { color:var(--muted); text-align:center; margin:24px 0; }
.nc-shared-invitations { margin:8px; font-size:13px; }
.sg-entry-count:empty { display:none; }
.sg-avatar-person { position:relative; display:flex; align-items:center; justify-content:center; background:var(--avatar-surface); font-size:13px; color:var(--accent); }
.sg-avatar-person small { position:absolute; right:1px; bottom:0; font-size:7px; color:var(--accent); line-height:1; background:var(--panel-surface); }
.sg-confirm { width:min(480px,calc(100vw - 28px)); }
.sg-confirm .sg-dialog-actions { justify-content:flex-end; }
.sg-confirm-request { max-height:38dvh; overflow:auto; border:1px solid var(--line); border-radius:6px; padding:10px 12px; }
.sg-confirm-request h3 { font-size:13px; margin:0; }
.sg-confirm-request .sg-text { margin:6px 0 0; }
@media(max-width:1000px) { .sg-send-footer small { display:none; } }
@media(max-width:760px) {
  .sg-header { padding:9px 14px; gap:8px; min-height:60px; }
  .shared-groups-pane .sg-mobile-list { display:block; font-size:22px; line-height:1; min-width:32px; padding:4px 8px; border:0; background:transparent; }
  .sg-header h1 { font-size:16px; }
  .sg-header-actions { gap:2px; }
  .sg-header-actions>button, .sg-more>summary { padding-inline:7px; min-height:32px; }
  .sg-messages { padding:16px 14px; }
  .sg-message { gap:8px; }
  .sg-message-avatar { width:32px; height:32px; }
  .sg-message-body { max-width:calc(100% - 40px); }
  .sg-composer { padding:8px 14px 10px; column-gap:6px; }
  .sg-composer textarea { min-height:78px; }
  .sg-compose-tools { gap:2px; }
  .sg-compose-tools>button { padding-inline:6px; }
  .sg-composer [data-sg-work-fields] { align-items:stretch; gap:8px; }
  .sg-composer [data-sg-work-fields] label { flex:1 1 140px; }
  .sg-composer [data-sg-work-fields] input { width:100%; }
  .sg-feedback { padding-inline:14px; }
}
@media(max-height:520px) { .sg-composer textarea { min-height:64px; max-height:24dvh; } }

/* Typing @ and the toolbar open the same compact member list. */
.sg-composer { position:relative; }
.sg-mention-menu { position:absolute; left:24px; bottom:calc(100% + 6px); z-index:80; width:248px; max-width:calc(100% - 48px); max-height:min(230px,40dvh); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:4px; border:1px solid var(--line); border-radius:7px; background:var(--panel-surface); box-shadow:var(--popover-shadow,var(--dialog-shadow)); }
.shared-groups-pane .sg-mention-menu button { display:flex; align-items:center; gap:9px; width:100%; min-height:42px; margin:0; border:0; border-radius:4px; background:transparent; text-align:left; padding:6px 8px; }
.shared-groups-pane .sg-mention-menu button:hover, .shared-groups-pane .sg-mention-menu button[aria-selected=true] { background:var(--menu-hover,var(--row-hover)); }
.sg-mention-avatar { display:grid; place-items:center; flex:none; width:26px; height:26px; overflow:hidden; border-radius:4px; background:var(--avatar-surface); color:var(--accent); font-size:12px; }
.sg-mention-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.sg-mention-text { display:flex; flex-direction:column; flex:1; min-width:0; }
.sg-mention-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:18px; font-weight:400; }
.sg-mention-owner { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:11px; line-height:14px; }
.sg-mention-ai { flex:none; font-size:10px; line-height:16px; color:var(--muted); }
@media(max-width:760px) { .sg-mention-menu { left:14px; max-width:calc(100% - 28px); } }
.sg-avatar-person>img[data-shared-member-avatar],.gmp-avatar>img[data-shared-member-avatar],.sg-message-avatar>img[data-shared-member-avatar]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;border-radius:inherit}

/* Own-message delivery/read receipts (BUG-20261031-028). */
.sg-message-body>.sg-receipt{display:block;text-align:right;margin-top:2px}
.sg-message-body>.sg-receipt[data-receipt-state="read"]{color:var(--accent,#16735a)}
