/* Family list lives directly on page; member tabs and work rows remain card surfaces. */
.page-shell--family .family-workspace-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.family-list-titlebar,
.family-list-titlebar__controls {
  display: contents;
}

.family-list-titlebar__copy {
  display: none;
}

/* Family cards grow with wrapped parent and nested copy; the shared completion
   collapse class remains more specific and can still animate max-height to 0. */
.family-assigned-work-row {
  max-height: none;
}

@media (min-width: 761px) {
  .page-shell--family .family-workspace-grid {
    width: min(100%, 42rem);
    max-width: 42rem;
    margin-inline: auto;
  }

  .page-shell--family:not(.is-editing-family-work) .family-list-titlebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 2.8rem;
    align-items: center;
    gap: 0.75rem;
  }

  .family-list-titlebar__copy {
    display: block;
    min-width: 0;
  }

  .family-list-titlebar__copy h2 {
    margin: 0;
    color: var(--app-ink);
    font-size: 1.65rem;
    font-weight: var(--font-weight-strong);
    line-height: 1.05;
  }

  .family-list-titlebar__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
  }

  .page-shell--family:not(.is-editing-family-work) .family-member-filter.segmented {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-height: auto;
    padding: 0.18rem;
    border-radius: var(--radius-md);
  }
}

/* Family shares the canonical Tasks cards, with its own member filter. */
.page-shell--family .personal-task-row {
  grid-template-columns: 1.5rem minmax(0, 1fr);
  column-gap: 0.375rem;
  min-height: 3.85rem;
  padding: 0.9rem 1.05rem;
  border-radius: 16px;
  background: var(--app-surface);
}
.page-shell--family .personal-task-toggle,
.page-shell--family .personal-task-toggle input {
  width: 1.5rem;
  height: 1.5rem;
}
@media (max-width: 760px) {
  .page-shell--family .personal-task-list { gap: 0; }
  .page-shell--family .family-member-work-group {
    padding: 0.9rem 0.82rem;
    border: 1px solid var(--app-line);
    border-radius: 1.22rem;
    background: var(--app-surface);
  }
  .page-shell--family .personal-task-toggle,
  .page-shell--family .personal-task-toggle input {
    width: 1.7rem;
    height: 1.7rem;
  }
  .page-shell--family .personal-task-row {
    grid-template-columns: 1.7rem minmax(0, 1fr);
    min-height: 3.12rem;
    padding: 0.62rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .page-shell--family .personal-task-row + .personal-task-row {
    border-top: 1px solid var(--app-line);
  }
}
