The specific span of seven days is generally traced to a single verse in Genesis describing Joseph observing seven days of mourning for his father Jacob, a length rabbinic law later fixed as the standard period for the closest relatives of any death rather than a practice unique to that one biblical account. Shiva's restrictions, remaining at home, sitting low rather than in ordinary chairs, covering mirrors, avoiding leather shoes, and setting aside ordinary work and study, are widely read as a coordinated suspension of the everyday signals of vanity, comfort, and productivity, deliberately stripping away the routines that would otherwise pull a mourner's attention away from grief during the most intense stage of loss. The one rule that overrides all the others is the Sabbath: on Shabbat, public mourning observances are suspended, mourners may leave the house to attend synagogue and are not visibly marked as mourners in communal settings, even though their private mourning status continues unbroken beneath the surface, a distinction rabbinic law draws carefully between public display and the underlying legal state of mourning.
A further, less intuitive rule follows from the same logic in reverse: because the day the Sabbath falls within the week still counts toward the seven days despite its suspended observances, shiva can in effect be shortened in real time when it begins shortly before a Sabbath, one of several calendar quirks that only make sense once the distinction between public observance and legal mourning status is understood.