.family-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.family-feedback-more { position: relative; }
.family-feedback-more[open] { flex: 1 1 100%; }
.family-feedback-more > summary { cursor: pointer; padding: 7px 10px; font-size: 13px; }
.family-feedback-menu { width: min(300px, 100%); padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.family-feedback-menu p { margin: 0 0 8px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.family-feedback-menu a { display: block; padding: 10px 8px; border-radius: 6px; text-decoration: none; }
.family-feedback-menu a:hover { background: var(--bg); }
.family-feedback-menu small { display: block; margin: 8px; line-height: 1.6; }
.family-feedback a:focus-visible, .family-feedback summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.family-feedback-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.family-feedback-selection label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.family-feedback-selection select { max-width: 100%; }
.brcard footer:has([data-family-entry]) { flex-wrap: wrap; align-items: center; }
.brcard [data-family-entry] { flex: 1 1 100%; min-width: 0; }
.family-feedback-focused .brcards, .family-feedback-focused .rpcards { grid-template-columns: minmax(0, 1fr); }
/* M-67 跟进总表行内：轻量 */
.family-feedback.compact { gap: 2px; flex-wrap: nowrap; }
.family-feedback.compact .family-feedback-more[open] { flex: none; }
.family-feedback.compact .family-feedback-menu { position: absolute; right: 0; top: 100%; z-index: 5; width: 260px; box-shadow: var(--sh-md); white-space: normal; }
.family-feedback.compact .family-feedback-more > summary { padding: 6px 8px; font-size: 12px; color: var(--muted); }

/* Keep the control strip and roster on one readable track. */
.brlist { min-width: 0; max-width: 1280px; container: brief-students / inline-size; }
.brief-toolbar { display: grid; grid-template-columns: minmax(200px, 420px) 160px auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.brief-toolbar > .findrow { grid-column: 1; display: block; min-width: 0; }
.brief-toolbar .findct { display: none; }
.brief-toolbar .sysearch { width: 100%; height: 44px; max-width: none; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--panel); }
.brief-toolbar .findbox:focus-within { outline: 2px solid var(--pri); outline-offset: -2px; }
.brief-toolbar :is(button, select):focus-visible { outline: 2px solid var(--pri); outline-offset: -2px; }
.brief-toolbar [data-brief-export]:focus-visible { outline-color: var(--panel); }
.brief-student-picker { grid-column: 2; display: block; min-width: 0; }
.brief-toolbar [data-brief-student] { width: 100%; height: 44px; min-height: 44px; min-width: 0; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font-size: 14px; }
.brief-toolbar .brief-layout-switch { grid-column: 3; height: 44px; padding: 0; gap: 0; border-radius: var(--r-sm); }
.brief-layout-switch button { min-width: 52px; min-height: 44px; height: 44px; padding: 0 12px; font-size: 13px; }
.brief-toolbar [data-brief-export] { grid-column: 5; height: 44px; }
.brief-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 48px; padding: 12px 0; }
.brief-context-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.brief-context [data-brief-count] { color: var(--ink); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.brief-context [data-brief-selected] { color: var(--pri-t); font-size: 13px; overflow-wrap: anywhere; }
.brief-context [data-brief-selected]:empty { display: none; }
.brief-export-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.brnone:empty { display: none; }
.brief-table-wrap { display: none; max-width: 100%; overflow: hidden; border: 1px solid var(--line2); border-radius: var(--r-md); background: var(--panel); }
.brief-table-wrap:focus-visible { outline: 2px solid var(--pri); outline-offset: -2px; }
.brief-as-list .brief-table-wrap { display: block; }
.brief-as-list > .brcards, .brief-as-list > .rpcards { display: none; }
.brief-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.brief-col-student { width: 200px; }
.brief-col-number { width: 96px; }
.brief-col-action { width: 112px; }
.brief-table th, .brief-table td { padding: 12px 16px; vertical-align: middle; text-align: left; border-bottom: 1px solid var(--line); }
.brief-table thead th { height: 44px; padding-top: 8px; padding-bottom: 8px; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.brief-table thead th:nth-child(2), .brief-table thead th:nth-child(3) { text-align: right; }
.brief-table thead th:last-child, .brief-table tbody td:last-child { text-align: right; }
.brief-table tbody th { font-weight: 500; }
.brief-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.brief-number { font-size: 16px; font-weight: 600; color: var(--ink); }
.brief-number.is-zero { color: var(--faint); font-weight: 400; }
.brief-person { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.brief-person-avatar { flex: none; }
.brief-person-avatar .mpav { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--pri-s); color: var(--pri-t); font-size: 13px; font-style: normal; }
.brief-person-text { min-width: 0; }
.brief-person-text b { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.brief-person-text small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.brief-person:is(:hover, :focus-visible) b { color: var(--pri-t); }
.brief-knowledge { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.brief-kp { display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; padding: 0 8px; border-radius: var(--r-xs); background: var(--soft); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.brief-no-kp { color: var(--muted); font-size: 13px; }
.brief-table .brief-row-export { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--pri-t); font-size: 13px; font-weight: 500; }
.brief-table .brief-row-export:is(:hover, :focus-visible) { background: var(--pri-s); }
.brief-table tr:last-child > * { border-bottom: 0; }
.brief-table tbody tr { transition: background-color 160ms ease-out; }
.brief-table tbody tr:is(:hover, :focus-within) { background: var(--soft); }
.brlist .brcard header { flex-wrap: wrap; }
@container brief-students (max-width: 720px) {
  .brief-toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .brief-toolbar > .findrow { grid-column: 1 / -1; }
  .brief-student-picker { grid-column: 1; }
  .brief-toolbar .brief-layout-switch { grid-column: 2; }
  .brief-toolbar [data-brief-export] { grid-column: 3; }
  .brief-col-student { width: 176px; }
  .brief-col-number { width: 88px; }
  .brief-col-action { width: 104px; }
}
@container brief-students (max-width: 560px) {
  .brief-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .brief-student-picker { grid-column: 1 / -1; }
  .brief-toolbar .brief-layout-switch { grid-column: 1; justify-self: start; }
  .brief-toolbar [data-brief-export] { grid-column: 2; }
  .brief-context { padding: 12px 0; gap: 4px; }
  .brief-context-main { flex-basis: 100%; }
  .brlist .brcards, .brlist .rpcards { grid-template-columns: minmax(0, 1fr); }
  .brief-table { table-layout: auto; }
  .brief-table colgroup { display: none; }
  .brief-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .brief-table tbody { display: block; }
  .brief-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .brief-table tbody tr:last-child { border-bottom: 0; }
  .brief-table tbody th, .brief-table tbody td { min-width: 0; padding: 0; border: 0; }
  .brief-table tbody th { grid-column: 1; grid-row: 1; }
  .brief-table td:nth-child(2) { grid-column: 1; grid-row: 2; text-align: left; }
  .brief-table td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .brief-table td:nth-child(2)::before { content: '本段错题 '; color: var(--muted); }
  .brief-table td:nth-child(3)::before { content: '待订正 '; color: var(--muted); }
  .brief-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  .brief-table td:nth-child(5) { grid-column: 2; grid-row: 1; align-self: center; }
}
