
.desktop-topbar__date-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.desktop-topbar__logo {
  display: none;
  background: var(--app-bg);
}

@media (min-width: 761px) {
body:has(.page-shell) {
    --app-desktop-header-top: 1.75rem;
    --app-desktop-header-height: 4.25rem;
  }
.desktop-sidebar {
    top: 2rem !important;
    right: var(--app-desktop-content-gutter) !important;
    left: var(--app-desktop-content-gutter) !important;
    display: flex !important;
    width: auto !important;
    height: 4.75rem !important;
    padding: 0 1rem !important;
    align-items: center !important;
    justify-content: center !important;
  }
.desktop-sidebar__nav {
    min-height: 4.75rem !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(1.1rem, 2.31vw, 2.64rem) !important;
  }
.desktop-sidebar__link {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 0.09rem !important;
    width: 4.9rem !important;
    min-width: 4.9rem !important;
    height: 3.15rem !important;
    min-height: 3.15rem !important;
    padding: 0.37rem 0.64rem !important;
    border: 0;
    border-radius: 1.16rem !important;
    background: transparent;
    color: var(--app-muted-2);
    font-size: 0.86rem !important;
    font-weight: var(--font-weight-strong) !important;
    line-height: 1.08 !important;
    text-align: center !important;
  }
.desktop-sidebar__link span:not(.desktop-sidebar__icon) {
    display: block;
    color: currentColor;
    line-height: 1.08;
  }
.desktop-sidebar__link:not(.is-active) {
    background: transparent !important;
    color: var(--app-muted-2) !important;
    opacity: 1;
  }
.desktop-sidebar__link.is-active {
    border: 0 !important;
    border-radius: 1.16rem !important;
    background: var(--app-primary-soft) !important;
    color: var(--app-primary-ink) !important;
  }
.desktop-sidebar__icon,
.desktop-sidebar__icon svg {
    width: 1.27rem !important;
    height: 1.27rem !important;
  }
body:has(.page-shell) .desktop-sidebar {
    top: 2rem;
    right: var(--app-desktop-content-gutter);
    left: var(--app-desktop-content-gutter);
    display: flex;
    width: auto;
    height: 4.75rem;
    padding: 0 1rem;
    align-items: center;
    justify-content: center;
  }
body:has(.page-shell) .desktop-sidebar__nav {
    min-height: 4.75rem;
    align-items: center;
    justify-content: center;
    gap: clamp(1.1rem, 2.31vw, 2.64rem);
  }
body:has(.page-shell) .desktop-sidebar__link {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    align-content: center;
    gap: 0.09rem;
    width: 4.9rem;
    min-width: 4.9rem;
    height: 3.15rem;
    min-height: 3.15rem;
    padding: 0.37rem 0.64rem;
    border: 0;
    border-radius: 1.16rem;
    background: transparent;
    color: var(--app-muted-2);
    font-size: 0.86rem;
    font-weight: var(--font-weight-strong);
    line-height: 1.08;
    text-align: center;
  }
body:has(.page-shell) .desktop-sidebar__link span:not(.desktop-sidebar__icon) {
    display: block;
    color: currentColor;
    line-height: 1.08;
  }
body:has(.page-shell) .desktop-sidebar__link:not(.is-active) {
    color: var(--app-muted-2);
    opacity: 1;
  }
body:has(.page-shell) .desktop-sidebar__link.is-active {
    border: 0 !important;
    border-radius: 1.16rem;
    background: var(--app-primary-soft);
    color: var(--app-primary-ink);
  }
body:has(.page-shell) .desktop-sidebar__icon,
body:has(.page-shell) .desktop-sidebar__icon svg {
    width: 1.27rem;
    height: 1.27rem;
  }
}

@media (min-width: 761px) {
.daily-timeline-panel > [data-responsive-list-utilities] {
    grid-column: 2;
    grid-row: 1;
  }
.daily-timeline-panel > .list-search-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }
.daily-timeline-panel :is(.daily-timeline-list, .daily-preview-empty-row) {
    grid-column: 1 / -1;
  }
}
:is(.page-shell--family) .daily-timeline-list {
  display: grid;
}
:is(.page-shell--family) .daily-timeline-row {
  border: 0;
  border-radius: 0;
  background: transparent;
}
:is(.page-shell--family) .daily-timeline-row + .daily-timeline-row {
  border-top: 1px solid var(--app-line);
}


@media (max-width: 760px) {
:is(
    .page-shell--tasks:not(.is-creating-task):not(.is-editing-task),
    .page-shell--calendar
  ) .tasks-list-panel {
    min-width: 0;
    min-height: 0;
    padding: 0.9rem 0.82rem 0.96rem;
    border: 1px solid var(--app-line);
    border-radius: 1.22rem;
    background: var(--app-surface);
  }
:is(
    .page-shell--tasks:not(.is-creating-task):not(.is-editing-task),
    .page-shell--calendar
  ) .tasks-list-panel :is( .personal-task-list, .calendar-event-list) {
    gap: 0;
  }
:is(
    .page-shell--tasks:not(.is-creating-task):not(.is-editing-task),
    .page-shell--calendar
  ) .tasks-list-panel :is( .personal-task-row, .calendar-event-row) {
    min-height: 3.12rem;
    padding: 0.62rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
:is(
    .page-shell--tasks:not(.is-creating-task):not(.is-editing-task),
    .page-shell--calendar
  ) .tasks-list-panel :is( .personal-task-row, .calendar-event-row) +
  :is( .personal-task-row, .calendar-event-row):not(.is-bulk-selected) {
    border-top: 1px solid var(--app-line);
  }
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-list-panel .tasks-list-titlebar {
    margin-bottom: 0.72rem;
  }
.tasks-list-panel .work-title__title-line > :is(strong, .task-row__title) {
    display: inline;
  }
:is(.page-shell--family) .daily-timeline-row {
    min-height: 3.12rem;
    padding: 0.22rem 0;
  }
}

@media (max-width: 340px) {
:is(
    .page-shell--tasks:not(.is-creating-task):not(.is-editing-task),
    .page-shell--calendar
  ) .tasks-list-panel {
    padding-inline: 0.65rem;
  }
}
:is(.page-shell--family) .daily-tasks-panel__heading {
  grid-template-columns: minmax(0, 1fr);
}
:is(.page-shell--family) .daily-tasks-open-pill {
  border: 0;
  border-radius: 999px;
  background: var(--app-primary-soft);
  color: var(--app-primary-ink);
  line-height: 1;
  white-space: nowrap;
}

@media (min-width: 761px) {
.desktop-sidebar.desktop-topbar,
body:has(.page-shell) .desktop-sidebar.desktop-topbar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 50;
    display: grid !important;
    grid-template-columns: minmax(0, max-content) minmax(max-content, 1fr) max-content !important;
    width: 100% !important;
    height: calc(var(--app-desktop-header-top) + var(--app-desktop-header-height)) !important;
    padding: var(--app-desktop-header-top) var(--app-desktop-content-gutter) 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--app-line) !important;
    border-radius: 0 !important;
    background: var(--app-bg) !important;
    color: var(--app-ink) !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
.desktop-topbar__date {
    align-self: center;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: var(--app-primary-ink);
    font-family: var(--app-display-font);
    font-size: clamp(1.62rem, 1.8vw, 1.95rem);
    font-weight: var(--font-weight-strong);
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
  }
.desktop-topbar__date-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    max-width: 100%;
  }
.desktop-topbar__date-link time {
    min-width: 0;
    overflow: hidden;
    padding-block-end: 0.16em;
    padding-inline-end: 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
.desktop-topbar__logo {
    display: block;
    width: 3.4rem;
    height: 3.4rem;
    flex: 0 0 3.4rem;
  }
.desktop-sidebar.desktop-topbar .desktop-sidebar__nav {
    grid-column: 2;
    gap: clamp(0.75rem, calc(8vw - 84px), 2.64rem) !important;
    align-self: center !important;
    justify-self: center !important;
    min-height: var(--app-desktop-header-height) !important;
  }
.desktop-topbar__actions {
    align-self: center;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.55rem;
  }
.desktop-topbar__action-placeholder {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    visibility: hidden;
  }
.desktop-topbar__action {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--app-line);
    border-radius: 0.84rem;
    background: var(--app-surface);
    color: var(--app-muted-2);
    outline: 0;
    text-decoration: none;
  }
.desktop-topbar__quick-add {
    border-color: color-mix(in srgb, var(--app-primary) 68%, var(--app-line));
    background: var(--app-primary);
    color: var(--md-sys-color-on-primary);
    font-size: 1.55rem;
    font-weight: var(--font-weight-body);
    line-height: 1;
    cursor: pointer;
  }
.desktop-topbar__action svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }
.desktop-topbar__inbox-count {
    position: absolute;
    top: -0.38rem;
    right: -0.22rem;
    display: grid;
    place-items: center;
    min-width: 1.08rem;
    height: 1.08rem;
    padding: 0 0.2rem;
    border: 2px solid var(--app-bg);
    border-radius: 999px;
    background: var(--app-danger-soft);
    color: var(--app-danger);
    font-size: 0.66rem;
    font-weight: var(--font-weight-strong);
    line-height: 1;
  }
.page-shell {
    padding-top: calc(var(--app-desktop-header-top) + var(--app-desktop-header-height) + 1.9rem) !important;
  }
.page-shell .app-header {
    display: none !important;
  }
}

/* Keep compact geometry until the full-size logo/date and six-tab row have
   enough independent space. The prior 1100px cutoff created a collision at
   1101px when the full-size measurements returned. */
@media (min-width: 761px) and (max-width: 1199px) {
.desktop-sidebar.desktop-topbar .desktop-sidebar__nav {
    gap: 0.18rem !important;
  }
.desktop-topbar__date {
    font-size: 1.32rem;
  }
.desktop-topbar__date-link {
    gap: 0.4rem;
  }
.desktop-topbar__logo {
    width: 2.5rem;
    height: 2.5rem;
    flex-basis: 2.5rem;
  }
.desktop-sidebar.desktop-topbar .desktop-sidebar__link {
    width: 3.4rem !important;
    min-width: 3.4rem !important;
    padding: 0.3rem 0.28rem !important;
    font-size: 0.72rem !important;
  }
}

/* A full September weekday plus six links and three actions must also fit
   when a classic scrollbar reduces the available desktop width. */
@media (min-width: 761px) and (max-width: 900px) {
.desktop-sidebar.desktop-topbar,
body:has(.page-shell) .desktop-sidebar.desktop-topbar {
    padding-inline: 0.5rem !important;
  }
.desktop-topbar__date {
    font-size: 1rem;
  }
.desktop-topbar__date-link {
    gap: 0.15rem;
  }
}
.shared-workspace-header {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--app-ink);
}
.workspace-subheader {
  display: none;
}
.phone-header-utilities {
  display: none;
}

@media (max-width: 760px) {
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    min-height: 4.45rem;
    padding: 0.7rem 0 0.5rem;
  }
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-app-header .app-header__copy {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    grid-template-rows: 2.75rem;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    column-gap: 0.75rem;
    min-width: 0;
  }
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-header-back-link {
    grid-column: 1;
    grid-row: 1;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
  }
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-app-header .app-header__title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
  }
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-app-header .phone-list-utilities-target {
    grid-column: 2;
    grid-row: 1;
  }
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-app-header .app-header__actions {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
.page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .task-create-panel__summary {
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
  }
.page-shell--tasks:has(> .shared-workspace-header) {
    gap: 1rem !important;
    padding-top: calc(env(safe-area-inset-top) + 0.35rem) !important;
  }
.page-shell:has(> .workspace-subheader) {
    gap: 1rem !important;
    padding-top: calc(env(safe-area-inset-top) + 0.35rem) !important;
  }
.workspace-subheader {
    display: flex;
    align-items: center;
    min-height: 1.8rem;
    margin: 0 0 -0.75rem;
    padding-inline: 0.1rem;
  }
.workspace-subheader h2 {
    margin: 0;
    color: #24211d;
    font-size: 1.28rem;
    font-weight: var(--font-weight-strong);
    letter-spacing: -0.02em;
    line-height: 1.1;
  }
.page-shell--family .family-list-titlebar__copy {
    display: none !important;
  }
.page-shell .shared-workspace-header.daily-dashboard__header.app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 2.75rem auto;
    align-items: start;
    box-sizing: border-box;
    width: calc(100vw - 2.5rem);
    max-width: 100%;
    justify-self: center;
    min-height: 4.45rem;
    margin-bottom: 0;
    padding: 0.18rem 0 0.34rem;
  }
.page-shell .shared-workspace-header .daily-dashboard__title {
    grid-column: 1 / -1;
    grid-row: 1 / 3;
    width: 100%;
  }
.page-shell .shared-workspace-header .daily-dashboard__title-mobile {
    grid-template-rows: 2.75rem auto;
    gap: 0;
  }
.page-shell .shared-workspace-header .daily-dashboard__weekday {
    align-self: center;
    justify-self: start;
  }
.page-shell .shared-workspace-header .daily-dashboard__date {
    justify-self: start;
  }
.page-shell .shared-workspace-header .daily-dashboard__actions {
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    gap: 0.2rem;
  }
.phone-header-utilities {
    display: contents;
  }
.phone-header-action {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-muted-2);
    text-decoration: none;
    line-height: 0;
  }
.phone-header-action svg {
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    margin: auto;
    stroke-width: 1.8;
  }
.phone-header-inbox__count {
    position: absolute;
    top: -0.42rem;
    right: -0.28rem;
    display: grid;
    place-items: center;
    min-width: 1.08rem;
    height: 1.08rem;
    padding: 0 0.2rem;
    border: 2px solid var(--app-bg);
    border-radius: 999px;
    background: var(--app-danger-soft);
    color: var(--app-danger);
    font-size: 0.66rem;
    font-weight: var(--font-weight-strong);
    line-height: 1;
  }
.phone-header-action__surface {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border: 1px solid color-mix(in srgb, var(--app-muted-2) 32%, var(--app-line));
    border-radius: 0.72rem;
    background: var(--app-surface);
    color: var(--app-muted-2);
    line-height: 0;
    pointer-events: none;
  }
.shared-workspace-header .daily-dashboard__inbox,
.shared-workspace-header .daily-dashboard__settings,
.workspace-create-button:has(> .phone-header-action__surface--primary) {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    flex: 0 0 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
.shared-workspace-header .daily-dashboard__inbox svg,
.shared-workspace-header .daily-dashboard__settings svg {
    width: 0.9rem;
    height: 0.9rem;
  }
.workspace-create-button:has(> .phone-header-action__surface--primary)::before,
.workspace-create-button:has(> .phone-header-action__surface--primary)::after {
    content: none;
  }
.workspace-create-button > .phone-header-action__surface--primary {
    border-color: var(--app-line);
    background: var(--app-surface);
    color: var(--app-muted);
    font-size: 1.22rem;
    font-weight: var(--font-weight-body);
    line-height: 1;
  }
.workspace-create-button > .phone-header-action__surface--primary > span {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
  }
.family-app-header .app-header__actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }
}

a.calendar-connect-action,
a.calendar-connect-action:visited {
  border-color: var(--color-teal-dark);
  background: var(--color-teal);
  color: var(--md-sys-color-on-primary);
  opacity: 1;
}
a.calendar-connect-action:hover,
a.calendar-connect-action:focus-visible {
  border-color: var(--color-teal-dark);
  background: var(--color-teal-dark);
  color: var(--md-sys-color-on-primary);
}
:is(.page-shell--family) .daily-task-due.schedule-row-status {
  display: grid;
  gap: 0.2rem;
  text-align: center;
}
.schedule-row-status .is-overdue {
  color: var(--app-danger);
}

/* Installed iPhone apps paint a native scroll-edge blur below the status bar.
   Safe-area padding alone does not clear it, especially the raised Inbox badge.
   Keep the entire shared header below that band without moving phone docks. */
@media (max-width: 760px) and (display-mode: standalone) {
  @supports (-webkit-touch-callout: none) {
    .page-shell .shared-workspace-header {
      margin-top: 2rem;
    }
  }
}

/* Keep the reading column stable when switching between planning destinations. */
@media (min-width: 761px) {
  .page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-layout,
  .page-shell--tasks:is(.is-creating-task, .is-editing-task) .tasks-layout,
  .page-shell--tasks:is(.is-creating-task, .is-editing-task) .tasks-workspace,
  .page-shell--calendar .calendar-layout,
  .page-shell--family .family-workspace-grid {
    width: min(100%, 42rem);
    max-width: 42rem;
    margin-inline: auto;
  }
  .page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-list-panel,
  .page-shell--calendar .calendar-list-panel {
    padding-inline: 0;
  }
}
@media (max-width: 760px) {
  .page-shell--tasks:not(.is-creating-task):not(.is-editing-task) .tasks-layout {
    width: calc(100vw - 2.5rem);
    margin-inline: auto;
  }
}

/* Shared Schedule surface, with existing grouping and actions preserved. */
body :is(.page-shell--tasks:not(.is-creating-task):not(.is-editing-task), .page-shell--tasks:is(.is-creating-task, .is-editing-task), .page-shell--calendar, .page-shell--family) :is(.tasks-list-panel, .calendar-list-panel, .family-workspace-panel) {
  padding: 1.125rem;
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-surface);
}
body .page-shell :is(.personal-task-list, .calendar-event-list) { gap: 0; }
body .page-shell :is(.personal-task-row, .calendar-event-row) {
  padding: .75rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body .page-shell :is(.personal-task-row, .calendar-event-row) + :is(.personal-task-row, .calendar-event-row) {
  border-top: 1px solid var(--app-line);
}
@media (max-width: 760px) {
  body :is(.page-shell--tasks:not(.is-creating-task):not(.is-editing-task), .page-shell--tasks:is(.is-creating-task, .is-editing-task), .page-shell--calendar, .page-shell--family) :is(.tasks-list-panel, .calendar-list-panel, .family-workspace-panel) {
    padding: .9rem .82rem .96rem;
    border-radius: 1.22rem;
  }
}

body .page-shell--family .family-workspace-panel .family-member-work-group {
  padding: 0; border: 0; border-radius: 0; background: transparent;
}
@media (min-width: 761px) {
  body :is(.page-shell--tasks:not(.is-creating-task):not(.is-editing-task), .page-shell--tasks:is(.is-creating-task, .is-editing-task), .page-shell--calendar, .page-shell--family) :is(.tasks-list-titlebar__copy, .calendar-list-titlebar__copy, .family-list-titlebar__copy) h2 {
    color: var(--app-primary);
    font-size: 1.02rem;
    font-weight: var(--font-weight-strong);
    line-height: 1.2;
    text-transform: uppercase;
  }
}
