/* 群聊绑定：桌面沿用表格，手机按单项绑定纵向阅读。 */
.group-mobile-only, .group-mobile-details { display: none; }
#group-filter-fields { display: contents; }
#group-filter-dialog { padding: 0; color: var(--ink); }
#group-filter-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); }
#group-filter-title { margin: 0; font-size: 19px; }
#group-filter-dialog-body { padding: 18px; overflow-y: auto; min-height: 0; }
@media (max-width: 700px) {
  #page-groups .group-mobile-only { display: flex; }
  #group-mobile-search { gap: 8px; width: 100%; }
  #group-mobile-query { flex: 1; width: 0; min-width: 0; margin: 0; }
  #page-groups button, #group-filter-dialog button { min-height: 44px; }
  #page-groups input, #page-groups select, #group-filter-dialog input, #group-filter-dialog select { font-size: 16px; }
  #page-groups .group-toolbar { gap: 12px; }
  #page-groups .group-binding-list { overflow: visible; padding: 0 14px 14px; }
  #group-binding-table, #group-rows { display: block; width: 100%; min-width: 0; }
  #group-binding-table thead { display: none; }
  #group-binding-table.group-selection-mode thead { display: block; margin-bottom: 12px; }
  #group-binding-table thead tr { display: block; }
  #group-binding-table thead th { display: none; }
  #group-binding-table thead .col-check { display: block; width: auto; text-align: left; padding: 0; }
  #group-binding-table .col-check label { display: flex; gap: 10px; align-items: center; margin: 0; }
  #group-binding-table .col-check input { width: 22px; height: 22px; }
  #group-rows { display: grid; gap: 12px; }
  #group-rows > tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  #group-rows > tr > td { display: block; grid-column: 1 / -1; min-width: 0; width: auto; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  #group-rows > tr > td:nth-child(1) { grid-column: 2; grid-row: 1 / 3; align-self: start; }
  #group-rows > tr > td:nth-child(3) { grid-column: 1; grid-row: 1; font-size: 16px; }
  #group-rows > tr > td:nth-child(4) { grid-column: 1; grid-row: 2; color: #71817b; font-size: 13px; }
  #group-rows > tr > td:nth-child(6) { grid-row: 3; margin-top: 4px; }
  #group-rows > tr > td:nth-child(6)::before { content: '接收群'; display: block; color: #71817b; font-size: 12px; margin-bottom: 4px; }
  #group-rows > tr > td:nth-child(6) strong { font-weight: 500; }
  #group-rows > tr > td:nth-child(6) small,
  #group-rows > tr > td:nth-child(2), #group-rows > tr > td:nth-child(5), #group-rows > tr > td:nth-child(8) { display: none; }
  #group-rows > tr > .binding-bot-cell { grid-row: 4; }
  #group-rows > tr > .binding-bot-cell::before { content: '负责机器人'; display: block; color: #71817b; font-size: 12px; }
  #group-rows > tr > td:nth-child(9) { grid-row: 5; grid-column: 1; align-self: center; }
  #group-rows > tr > td:nth-child(10) { display: contents; }
  #group-rows > tr > td:nth-child(10) > div { grid-row: 5; grid-column: 2; align-self: center; }
  #group-rows .binding-status-list { display: flex; flex-wrap: wrap; gap: 4px 8px; min-width: 0; font-size: 12px; }
  #group-rows .binding-status-list span { padding: 3px 6px; background: #edf4ee; border-radius: 5px; }
  #group-rows .binding-actions { flex-wrap: wrap; }
  #group-rows .group-mobile-details { display: block; grid-column: 1 / -1; grid-row: 6; border-top: 1px solid var(--line); margin-top: 4px; }
  .group-mobile-details summary { padding: 10px 0; min-height: 44px; color: #617c6f; cursor: pointer; font-size: 13px; }
  .group-mobile-details dl { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 8px 12px; margin: 0 0 4px; font-size: 13px; }
  .group-mobile-details dt { color: #71817b; }
  .group-mobile-details dd { margin: 0; overflow-wrap: anywhere; }
  #group-filter-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #group-filter-dialog[open] { display: flex; flex-direction: column; }
  #group-filter-dialog .group-search { display: flex; flex-direction: column; gap: 14px; }
  #group-filter-dialog .group-search > :not([hidden]) { width: 100%; flex: none; margin: 0; }
  #group-filter-dialog .group-search [hidden], #group-rows [hidden] { display: none !important; }
  #binding-editor { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #binding-editor .binding-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; overflow: visible; }
  #binding-editor .binding-tabs button { white-space: normal; min-height: 44px; }
  #binding-editor input, #binding-editor select { font-size: 16px; }
  #binding-editor .binding-dialog-footer { padding-bottom: env(safe-area-inset-bottom); }
  #binding-editor .binding-form-actions { gap: 8px; }
  #binding-editor .binding-form-actions > .muted { flex-basis: 100%; }
  #binding-editor .binding-form-actions button { flex: 1; min-height: 44px; }
}
