/* =========================================================
   FamilyChat Home / Overview dashboard
   Scoped to the existing Home tab (#friendsTab) only.
   ========================================================= */

#friendsTab .overview-page-panel {
  grid-column: 2 / -1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 36px);
  background: transparent;
}

#friendsTab .overview-dashboard {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-bottom: 28px;
  color: #101828;
}

#friendsTab .overview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

#friendsTab .overview-hero-copy h2 {
  margin: 0;
  color: #101828;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

#friendsTab .overview-hero-copy p {
  margin: 8px 0 0;
  color: #667085;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 650;
  line-height: 1.35;
}

#friendsTab .overview-hero-copy p + p {
  margin-top: 4px;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 600;
}

#friendsTab .overview-hero-copy.is-overview-copy-ready > * {
  opacity: 0;
  transform: translateX(-22px);
  transition:
    opacity 0.42s ease,
    transform 0.46s cubic-bezier(0.22, 1, 0.36, 1);
}

#friendsTab .overview-hero-copy.is-overview-copy-ready.is-overview-copy-visible > * {
  opacity: 1;
  transform: translateX(0);
}

#friendsTab .overview-hero-copy.is-overview-copy-ready > *:nth-child(2) {
  transition-delay: 0.08s;
}

#friendsTab .overview-hero-copy.is-overview-copy-ready > *:nth-child(3) {
  transition-delay: 0.16s;
}

@media (prefers-reduced-motion: reduce) {
  #friendsTab .overview-hero-copy.is-overview-copy-ready > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

#friendsTab .overview-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

#friendsTab .overview-add-family-button,
#friendsTab .overview-profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(39, 44, 74, 0.08);
}

#friendsTab .overview-add-family-button {
  color: #6c52f8;
  font-size: 23px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#friendsTab .overview-add-family-button:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 16px 32px rgba(108, 82, 248, 0.16);
}

#friendsTab .overview-profile-avatar {
  overflow: hidden;
  padding: 0;
  line-height: 0;
}

#friendsTab .overview-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#friendsTab .overview-grid.overview-grid-compact {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 !important;
}

#friendsTab .overview-card-shell {
  position: relative;
  min-width: 0;
  min-height: 305px;
  overflow: hidden;
  border: 1px solid rgba(226, 230, 242, 0.92);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(32, 38, 62, 0.07);
}

#friendsTab .overview-card-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 0%, rgba(116, 76, 255, 0.06), transparent 32%),
    radial-gradient(circle at 96% 22%, rgba(75, 145, 255, 0.05), transparent 28%);
}

#friendsTab .overview-card-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.4vw, 28px);
}

#friendsTab .overview-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

#friendsTab .overview-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

#friendsTab .overview-icon-bubble {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #644cff;
  background: #f2efff;
  font-size: 18px;
}

#friendsTab .overview-card-title h3 {
  margin: 0;
  overflow: hidden;
  color: #101828;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#friendsTab .overview-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #5b3ff4;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
}

#friendsTab .overview-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

#friendsTab .overview-family-task-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(108, 82, 248, 0.16);
  border-radius: 999px;
  background: rgba(242, 239, 255, 0.78);
  color: #5b3ff4;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

#friendsTab .overview-family-task-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #6c52f8;
}

#friendsTab .overview-plans-sections {
  display: grid;
  gap: 16px;
  min-height: 0;
}

#friendsTab .overview-upcoming-section {
  padding-top: 14px;
  border-top: 1px solid rgba(226, 230, 242, 0.82);
}

#friendsTab .overview-section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#friendsTab .overview-section-heading-row h4 {
  margin: 0;
  color: #101828;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

#friendsTab .overview-section-count {
  min-width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f2efff;
  color: #5b3ff4;
  font-size: 12px;
  font-weight: 900;
}

#friendsTab .overview-plan-list,
#friendsTab .overview-tasks-list,
#friendsTab .overview-wall-list,
#friendsTab .overview-shopping-list {
  display: grid;
  gap: 0;
}

#friendsTab .overview-plan-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(62px, 82px) 12px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(226, 230, 242, 0.72);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

#friendsTab .overview-plan-row:last-child {
  border-bottom: 0;
}

#friendsTab .overview-plan-time {
  color: #5b3ff4;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

#friendsTab .overview-plan-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--overview-plan-accent, #6c52f8);
  box-shadow: 0 0 0 5px rgba(108, 82, 248, 0.11);
}

#friendsTab .overview-plan-main,
#friendsTab .overview-task-main,
#friendsTab .overview-shopping-main {
  min-width: 0;
}

#friendsTab .overview-plan-main strong,
#friendsTab .overview-task-title,
#friendsTab .overview-shopping-main strong,
#friendsTab .overview-wall-author {
  display: block;
  overflow: hidden;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#friendsTab .overview-plan-main small,
#friendsTab .overview-task-main small,
#friendsTab .overview-shopping-main small,
#friendsTab .overview-wall-text {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#friendsTab .overview-plan-empty,
#friendsTab .overview-task-empty {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: rgba(247, 248, 253, 0.78);
  color: #667085;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

#friendsTab .overview-plan-empty i,
#friendsTab .overview-task-empty i {
  color: #8b75ff;
}

#friendsTab .overview-task-row,
#friendsTab .overview-wall-row,
#friendsTab .overview-shopping-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(226, 230, 242, 0.78);
}

#friendsTab .overview-task-row {
  grid-template-columns: 26px minmax(0, 1fr) auto;
}

#friendsTab .overview-task-row.is-modal-row {
  grid-template-columns: 28px minmax(0, 1fr) auto 36px;
}

#friendsTab .overview-task-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 2px solid #d2d8e7;
  color: transparent;
  background: #fff;
}

#friendsTab button.overview-task-check {
  cursor: pointer;
}

#friendsTab button.overview-task-check:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#friendsTab .overview-task-row.is-done .overview-task-check {
  border-color: #9b8cff;
  color: #fff;
  background: #a393ff;
}

#friendsTab .overview-task-meta,
#friendsTab .overview-shopping-tag,
#friendsTab .overview-wall-time {
  color: #8a93a8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#friendsTab .overview-task-meta.is-due {
  color: #f97316;
}

#friendsTab .overview-task-meta.is-done,
#friendsTab .overview-shopping-tag.is-done {
  color: #16a34a;
}

#friendsTab .overview-task-delete-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
  color: #e11d48;
  cursor: pointer;
}

#friendsTab .overview-wall-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
}

#friendsTab .overview-wall-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: #f0edff;
  color: #654cff;
  font-weight: 850;
}

#friendsTab .overview-wall-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#friendsTab .overview-shopping-row {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  max-height: 110px;
  overflow: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.22s ease, padding 0.22s ease, border-color 0.22s ease;
}

#friendsTab .overview-shopping-row.is-removing {
  max-height: 0;
  opacity: 0;
  transform: translateX(14px);
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
  pointer-events: none;
}

#friendsTab .overview-shopping-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 2px solid #d2d8e7;
  color: transparent;
  background: #fff;
}

#friendsTab .overview-shopping-row.is-done .overview-shopping-check {
  border-color: #9b8cff;
  color: #fff;
  background: #a393ff;
}

#friendsTab .overview-card-footer-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(226, 230, 242, 0.8);
  color: #5b3ff4;
  font-weight: 850;
  text-decoration: none;
}

#friendsTab .overview-write-link {
  justify-content: space-between;
}

#friendsTab .overview-task-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(19, 23, 38, 0.42);
  backdrop-filter: blur(12px);
}

#friendsTab .overview-task-modal-backdrop[hidden] {
  display: none !important;
}

#friendsTab .overview-task-modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100dvh - 42px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 230, 242, 0.92);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 34px 80px rgba(19, 23, 38, 0.22);
  animation: overviewTaskModalIn 0.34s cubic-bezier(0.21, 0.82, 0.33, 1) both;
}

@keyframes overviewTaskModalIn {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#friendsTab .overview-task-modal-header,
#friendsTab .overview-task-modal-toolbar,
#friendsTab .overview-task-form {
  flex: 0 0 auto;
}

#friendsTab .overview-task-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 14px;
  border-bottom: 1px solid rgba(226, 230, 242, 0.78);
}

#friendsTab .overview-modal-eyebrow {
  margin: 0 0 6px;
  color: #6c52f8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#friendsTab .overview-task-modal-header h2 {
  margin: 0;
  color: #101828;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.05em;
}

#friendsTab .overview-task-modal-close {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: #f4f5fb;
  color: #667085;
  font-size: 18px;
  cursor: pointer;
}

#friendsTab .overview-task-modal-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

#friendsTab .overview-task-private-toggle {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(108, 82, 248, 0.16);
  border-radius: 18px;
  background: #f6f3ff;
  color: #5b3ff4;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

#friendsTab .overview-task-private-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #6c52f8;
}

#friendsTab .overview-task-modal-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 24px 0;
}

#friendsTab .overview-family-task-toggle-large {
  padding: 9px 13px;
  font-size: 13px;
}

#friendsTab .overview-task-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px 24px 18px;
  border-bottom: 1px solid rgba(226, 230, 242, 0.78);
}

#friendsTab .overview-task-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

#friendsTab .overview-task-form input[type="text"],
#friendsTab .overview-task-form input[type="date"] {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(226, 230, 242, 0.92);
  border-radius: 16px;
  background: #fbfcff;
  color: #101828;
  font: inherit;
  font-weight: 700;
  padding: 0 14px;
  outline: 0;
}

#friendsTab .overview-task-form input:focus {
  border-color: rgba(108, 82, 248, 0.38);
  box-shadow: 0 0 0 4px rgba(108, 82, 248, 0.1);
}

#friendsTab .overview-task-add-button {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #7657ff, #5030e8);
  color: #fff;
  font: inherit;
  font-weight: 900;
  padding: 0 18px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(108, 82, 248, 0.22);
}

#friendsTab .overview-task-add-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

#friendsTab .overview-task-modal-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 24px 24px;
}

@media (min-width: 821px) {
  #friendsTab .overview-page-panel {
    padding-bottom: 40px;
  }
}

@media (max-width: 820px) {
  body:has(#friendsTab.active) .top-header.smart-header {
    display: none !important;
  }

  body:has(#friendsTab.active) .main-layout {
    height: 100dvh !important;
  }

  #friendsTab .overview-page-panel {
    grid-column: auto;
    height: 100%;
    padding: 16px 12px calc(112px + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #friendsTab .overview-dashboard {
    width: 100%;
    padding-bottom: 0;
  }

  #friendsTab .overview-hero {
    align-items: center;
    margin-bottom: 14px;
    padding: 0 2px;
  }

  #friendsTab .overview-hero-copy h2 {
    font-size: clamp(28px, 8.8vw, 36px);
  }

  #friendsTab .overview-hero-copy p {
    margin-top: 5px;
    font-size: 14px;
  }

  #friendsTab .overview-hero-copy p + p {
    font-size: 13px;
  }

  #friendsTab .overview-add-family-button,
  #friendsTab .overview-profile-avatar {
    width: 46px;
    height: 46px;
  }

  #friendsTab .overview-grid.overview-grid-compact {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  #friendsTab .overview-card-shell {
    min-height: auto;
    border-radius: 22px;
    box-shadow: 0 10px 22px rgba(32, 38, 62, 0.055);
  }

  #friendsTab .overview-card-inner {
    padding: 16px;
  }

  #friendsTab .overview-card-title-row {
    gap: 10px;
    margin-bottom: 14px;
  }

  #friendsTab .overview-icon-bubble {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    font-size: 15px;
  }

  #friendsTab .overview-card-title {
    gap: 10px;
  }

  #friendsTab .overview-card-title h3 {
    font-size: 18px;
  }

  #friendsTab .overview-card-actions {
    gap: 7px;
  }

  #friendsTab .overview-family-task-toggle {
    padding: 7px 9px;
    font-size: 11px;
  }

  #friendsTab .overview-card-link {
    font-size: 12px;
  }

  #friendsTab .overview-plan-row {
    grid-template-columns: minmax(64px, 80px) 12px minmax(0, 1fr);
  }

  #friendsTab .overview-task-row,
  #friendsTab .overview-wall-row,
  #friendsTab .overview-shopping-row {
    padding: 10px 0;
  }

  #friendsTab .overview-task-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  #friendsTab .overview-task-modal {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 28px;
  }

  #friendsTab .overview-task-modal-header {
    padding: 20px 18px 12px;
  }

  #friendsTab .overview-task-modal-header-actions {
    gap: 8px;
  }

  #friendsTab .overview-task-private-toggle {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 16px;
    font-size: 12px;
  }

  #friendsTab .overview-task-modal-header h2 {
    font-size: 28px;
  }

  #friendsTab .overview-task-modal-toolbar {
    padding: 12px 18px 0;
  }

  #friendsTab .overview-task-form {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 18px 16px;
  }

  #friendsTab .overview-task-add-button {
    width: 100%;
  }

  #friendsTab .overview-task-modal-list {
    padding: 8px 18px 18px;
  }
}

@media (max-width: 430px) {
  #friendsTab .overview-page-panel {
    padding: 14px 10px calc(102px + env(safe-area-inset-bottom));
  }

  #friendsTab .overview-hero-copy h2 {
    font-size: 28px;
  }

  #friendsTab .overview-hero-actions {
    gap: 8px;
  }

  #friendsTab .overview-add-family-button,
  #friendsTab .overview-profile-avatar {
    width: 42px;
    height: 42px;
  }

  #friendsTab .overview-card-inner {
    padding: 14px;
  }

  #friendsTab .overview-tasks-title-row {
    align-items: flex-start;
  }

  #friendsTab .overview-card-actions {
    flex-wrap: wrap;
  }

  #friendsTab .overview-task-row {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 9px;
  }

  #friendsTab .overview-task-row.is-modal-row {
    grid-template-columns: 24px minmax(0, 1fr) auto 32px;
  }

  #friendsTab .overview-task-meta,
  #friendsTab .overview-shopping-tag,
  #friendsTab .overview-wall-time {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #friendsTab .overview-task-modal {
    animation: none;
  }
}

/* Task add button + expandable task details (Home / Overview only) */
#friendsTab .overview-task-add-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #7657ff, #5030e8);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(108, 82, 248, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#friendsTab .overview-task-add-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(108, 82, 248, 0.28);
}

#friendsTab .overview-task-row {
  grid-template-columns: 26px minmax(0, 1fr) auto 34px;
  align-items: start;
}

#friendsTab .overview-task-row.is-modal-row {
  grid-template-columns: 28px minmax(0, 1fr) auto 34px 36px;
}

#friendsTab .overview-task-check {
  margin-top: 1px;
}

#friendsTab .overview-task-details-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #f4f5fb;
  color: #667085;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.22s ease;
}

#friendsTab .overview-task-details-button:hover,
#friendsTab .overview-task-row.is-expanded .overview-task-details-button {
  background: #f2efff;
  color: #5b3ff4;
}

#friendsTab .overview-task-row.is-expanded .overview-task-details-button {
  transform: rotate(90deg);
}

#friendsTab .overview-task-details-panel {
  grid-column: 2 / -1;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease, margin-top 0.22s ease;
}

#friendsTab .overview-task-row.is-expanded .overview-task-details-panel {
  max-height: 260px;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

#friendsTab .overview-task-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

#friendsTab .overview-task-detail-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f6f7fb;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
}

#friendsTab .overview-task-detail-chips i {
  color: #8b75ff;
}

#friendsTab .overview-subtask-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#friendsTab .overview-subtask-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

#friendsTab .overview-subtask-list li span {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 2px solid #d2d8e7;
  border-radius: 5px;
  color: transparent;
  background: #fff;
  font-size: 9px;
}

#friendsTab .overview-subtask-list li.is-done span {
  border-color: #9b8cff;
  color: #fff;
  background: #a393ff;
}

#friendsTab .overview-task-no-subtasks {
  margin: 0;
  color: #8a93a8;
  font-size: 12px;
  font-weight: 750;
}

#friendsTab .overview-task-subtasks-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 230, 242, 0.9);
  border-radius: 18px;
  background: #fbfcff;
}

#friendsTab .overview-task-subtasks-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

#friendsTab .overview-task-subtasks-label-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #5b3ff4;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#friendsTab .overview-task-subtask-inputs {
  display: grid;
  gap: 8px;
}

#friendsTab .overview-task-subtask-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
}

#friendsTab .overview-task-form .overview-task-subtask-input-row input[type="text"] {
  height: 42px;
}

#friendsTab .overview-task-subtask-input-row button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: #f4f5fb;
  color: #667085;
  cursor: pointer;
}

@media (max-width: 820px) {
  #friendsTab .overview-task-add-icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    font-size: 15px;
  }

  #friendsTab .overview-task-row {
    grid-template-columns: 24px minmax(0, 1fr) auto 32px;
  }

  #friendsTab .overview-task-row.is-modal-row {
    grid-template-columns: 24px minmax(0, 1fr) auto 32px 32px;
  }

  #friendsTab .overview-task-details-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  #friendsTab .overview-tasks-title-row {
    align-items: center;
  }

  #friendsTab .overview-task-row {
    grid-template-columns: 22px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  #friendsTab .overview-task-row .overview-task-meta {
    display: none;
  }

  #friendsTab .overview-task-row.is-modal-row {
    grid-template-columns: 22px minmax(0, 1fr) 32px 32px;
  }

  #friendsTab .overview-task-subtasks-label-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Shopping List live container (Home / Overview only) */
#friendsTab .overview-shopping-card {
  grid-column: 1 / -1;
}

#friendsTab .overview-shopping-title-row {
  align-items: center;
}

#friendsTab .overview-shopping-add-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #7657ff, #5030e8);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(108, 82, 248, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#friendsTab .overview-shopping-add-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(108, 82, 248, 0.28);
}

#friendsTab .overview-shopping-empty {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: rgba(247, 248, 253, 0.78);
  color: #667085;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

#friendsTab .overview-shopping-empty i {
  color: #8b75ff;
}

#friendsTab .overview-shopping-check-button {
  cursor: pointer;
}

#friendsTab .overview-shopping-check-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#friendsTab .overview-shopping-row.is-modal-row {
  grid-template-columns: 26px minmax(0, 1fr) auto 36px;
}

#friendsTab .overview-shopping-row.is-modal-row .overview-task-delete-button {
  justify-self: end;
}

#friendsTab .overview-shopping-form {
  grid-template-columns: minmax(0, 1.25fr) minmax(110px, 0.45fr) minmax(0, 1fr) auto;
}

#friendsTab .overview-shopping-notes-field {
  min-width: 0;
}

@media (max-width: 820px) {
  #friendsTab .overview-shopping-card {
    grid-column: auto;
  }

  #friendsTab .overview-shopping-add-icon {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    font-size: 15px;
  }

  #friendsTab .overview-shopping-form {
    grid-template-columns: 1fr;
  }

  #friendsTab .overview-shopping-row.is-modal-row {
    grid-template-columns: 24px minmax(0, 1fr) auto 32px;
  }
}

@media (max-width: 430px) {
  #friendsTab .overview-shopping-title-row {
    align-items: center;
  }

  #friendsTab .overview-shopping-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px;
  }

  #friendsTab .overview-shopping-row.is-modal-row {
    grid-template-columns: 22px minmax(0, 1fr) 32px;
  }

  #friendsTab .overview-shopping-row.is-modal-row .overview-shopping-tag {
    display: none;
  }
}


/* =========================================================
   Current home/chat header refinements
   ========================================================= */

#friendsTab .overview-hero-actions {
  gap: 0;
}

#friendsTab .overview-plans-card {
  min-height: 0;
  align-self: start;
}

#friendsTab .overview-plans-card .overview-card-inner {
  padding: clamp(14px, 2vw, 22px);
}

#friendsTab .overview-plans-card .overview-plans-sections {
  gap: 10px;
}

#friendsTab .overview-plans-card .overview-upcoming-section {
  padding-top: 10px;
}

#friendsTab .overview-plans-card .overview-section-heading-row {
  margin-bottom: 5px;
}

#friendsTab .overview-plans-card .overview-plan-row {
  padding: 6px 0;
}

#friendsTab .overview-plans-card .overview-plan-empty {
  min-height: 42px;
}

#friendsTab .overview-plans-footer-link {
  margin-top: 10px;
  padding-top: 12px;
  border: 0;
  border-top: 1px solid rgba(226, 230, 242, 0.78);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

#messagesTab .chat-new-button {
  border: 0;
  cursor: pointer;
}

#messagesTab .chat-actions .desktop-chat-new-button {
  background: linear-gradient(135deg, #7657ff, #5030e8);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(91, 53, 245, 0.18);
}

#messagesTab .chat-actions .desktop-chat-new-button:hover {
  background: linear-gradient(135deg, #8064ff, #5a38f0);
  color: #ffffff;
}

#messagesTab > .mobile-page-brand-header .mobile-page-brand-action.chat-new-button,
#messagesTab > .mobile-page-brand-header .mobile-page-brand-action.family-add-trigger {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  flex: 0 0 42px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(109, 93, 252, 0.14) !important;
  border-radius: 15px !important;
  background: #ffffff !important;
  color: #6d5dfc !important;
  font-size: 16px !important;
  line-height: 1 !important;
  box-shadow: 0 10px 22px rgba(91, 53, 245, 0.06) !important;
}

#messagesTab > .mobile-page-brand-header .mobile-page-brand-action.chat-new-button i,
#messagesTab > .mobile-page-brand-header .mobile-page-brand-action.family-add-trigger i {
  font-size: 15px !important;
  line-height: 1 !important;
}

@media (max-width: 820px) {
  #friendsTab .overview-plans-card .overview-card-inner {
    padding: 12px 14px;
  }

  #friendsTab .overview-plans-card .overview-plans-sections {
    gap: 8px;
  }

  #friendsTab .overview-plans-card .overview-upcoming-section {
    padding-top: 8px;
  }

  #friendsTab .overview-plans-card .overview-plan-row {
    grid-template-columns: minmax(56px, 72px) 10px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
  }

  #friendsTab .overview-plans-footer-link {
    margin-top: 8px;
    padding-top: 10px;
  }

  #messagesTab .desktop-chat-new-button {
    display: none !important;
  }
}

/* Family add action belongs in the app/page header on desktop. */
.smart-header-actions .desktop-page-chat-new-button {
  display: none !important;
  background: linear-gradient(135deg, #7657ff, #5030e8) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(91, 53, 245, 0.18) !important;
}

body[data-active-tab="messages"] .smart-header-actions .desktop-page-chat-new-button {
  display: grid !important;
}

.smart-header-actions .desktop-page-chat-new-button:hover {
  background: linear-gradient(135deg, #8064ff, #5a38f0) !important;
  color: #ffffff !important;
}

/* Keep the overview day summary focused; no duplicate schedule link in this card. */
#friendsTab .overview-plans-footer-link {
  display: none !important;
}

/* Tasks / Shopping share the same overview slot with horizontal swipe. */
#friendsTab .overview-task-shopping-carousel {
  min-width: 0;
  min-height: 305px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#friendsTab .overview-task-shopping-track {
  width: 100%;
  min-width: 0;
  min-height: 305px;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 26px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#friendsTab .overview-task-shopping-track::-webkit-scrollbar {
  display: none;
}

#friendsTab .overview-task-shopping-slide {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

#friendsTab .overview-task-shopping-slide.overview-card-shell {
  min-height: 305px;
}

#friendsTab .overview-task-shopping-carousel .overview-shopping-card {
  grid-column: auto;
}

#friendsTab .overview-task-shopping-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid rgba(226, 230, 242, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(32, 38, 62, 0.06);
}

#friendsTab .overview-carousel-dot {
  min-width: 78px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

#friendsTab .overview-carousel-dot.is-active {
  background: #f2efff;
  color: #5b3ff4;
  box-shadow: 0 8px 18px rgba(91, 53, 245, 0.1);
}

#friendsTab .overview-task-shopping-track:focus-visible,
#friendsTab .overview-carousel-dot:focus-visible {
  outline: 3px solid rgba(108, 82, 248, 0.24);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  #friendsTab .overview-task-shopping-carousel,
  #friendsTab .overview-task-shopping-track,
  #friendsTab .overview-task-shopping-slide.overview-card-shell {
    min-height: 0;
  }

  #friendsTab .overview-task-shopping-track {
    border-radius: 22px;
  }

  #friendsTab .overview-task-shopping-pagination {
    margin-top: -2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #friendsTab .overview-task-shopping-track {
    scroll-behavior: auto;
  }

  #friendsTab .overview-carousel-dot {
    transition: none;
  }
}

/* Mobile Overview: let the Tasks/Shopping swipe card fill the remaining screen height. */
@media (max-width: 820px) {
  body:has(#friendsTab.active) #friendsTab {
    min-height: 100dvh;
  }

  body:has(#friendsTab.active) #friendsTab .overview-page-panel {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  body:has(#friendsTab.active) #friendsTab .overview-dashboard {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body:has(#friendsTab.active) #friendsTab .overview-grid.overview-grid-compact {
    min-height: 0;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    align-items: stretch;
  }

  body:has(#friendsTab.active) #friendsTab .overview-task-shopping-carousel {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  body:has(#friendsTab.active) #friendsTab .overview-task-shopping-track {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  body:has(#friendsTab.active) #friendsTab .overview-task-shopping-slide.overview-card-shell {
    height: 100%;
    min-height: 0;
  }

  body:has(#friendsTab.active) #friendsTab .overview-task-shopping-slide .overview-card-inner {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body:has(#friendsTab.active) #friendsTab .overview-tasks-list,
  body:has(#friendsTab.active) #friendsTab .overview-shopping-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:has(#friendsTab.active) #friendsTab .overview-task-shopping-pagination {
    flex: 0 0 auto;
    margin-top: 0;
    margin-bottom: 0;
  }
}

@media (max-width: 430px) {
  body:has(#friendsTab.active) #friendsTab .overview-page-panel {
    padding-bottom: calc(102px + env(safe-area-inset-bottom));
  }
}

/* Overview profile prompt. */
#friendsTab .overview-profile-avatar {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#friendsTab .overview-profile-avatar:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(108, 82, 248, 0.16);
}

#friendsTab .overview-profile-avatar:focus-visible {
  outline: 3px solid rgba(108, 82, 248, 0.28);
  outline-offset: 3px;
}

#friendsTab .overview-profile-modal-backdrop[hidden] {
  display: none !important;
}

#friendsTab .overview-profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(12px);
}

#friendsTab .overview-profile-modal {
  width: min(430px, 100%);
  max-height: min(720px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid rgba(226, 230, 242, 0.92);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(118, 87, 255, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 70px rgba(20, 26, 46, 0.24);
}

#friendsTab .overview-profile-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 12px;
}

#friendsTab .overview-profile-modal-header h2 {
  margin: 2px 0 0;
  color: #101828;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
}

#friendsTab .overview-profile-prompt-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  padding: 8px 22px 24px;
}

#friendsTab .overview-profile-prompt-photo-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
}

#friendsTab .overview-profile-prompt-photo {
  width: 104px;
  height: 104px;
  border: 5px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(32, 38, 62, 0.18);
}

#friendsTab .overview-profile-photo-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7657ff, #5030e8);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(91, 53, 245, 0.18);
}

#friendsTab .overview-profile-prompt-summary {
  text-align: center;
}

#friendsTab .overview-profile-prompt-summary h3 {
  margin: 0;
  color: #101828;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

#friendsTab .overview-profile-prompt-summary p {
  margin: 6px 0 0;
  color: #6c52f8;
  font-size: 14px;
  font-weight: 800;
}

#friendsTab .overview-profile-detail-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

#friendsTab .overview-profile-detail-list > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(226, 230, 242, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

#friendsTab .overview-profile-detail-list .overview-profile-detail-wide {
  grid-column: 1 / -1;
}

#friendsTab .overview-profile-detail-list dt {
  margin: 0 0 5px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#friendsTab .overview-profile-detail-list dd {
  margin: 0;
  color: #1d2939;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#friendsTab .overview-profile-detail-list-compact {
  grid-template-columns: 1fr;
}


#friendsTab .overview-profile-tracking-panel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(226, 230, 242, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

#friendsTab .overview-profile-tracking-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#friendsTab .overview-profile-tracking-copy strong {
  color: #1d2939;
  font-size: 14px;
  font-weight: 850;
}

#friendsTab .overview-profile-tracking-copy span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

#friendsTab .overview-profile-tracking-toggle {
  flex: 0 0 auto;
  min-width: 70px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

#friendsTab .overview-profile-tracking-toggle.is-on {
  background: #5b35f5;
  color: #ffffff;
}

#friendsTab .overview-profile-tracking-toggle.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

#friendsTab .overview-profile-tracking-toggle:hover,
#friendsTab .overview-profile-tracking-toggle:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

#friendsTab .overview-profile-action-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#friendsTab .overview-profile-action-button {
  min-width: 0;
  min-height: 52px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  border: 1px solid rgba(226, 230, 242, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: #344054;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#friendsTab .overview-profile-action-button:hover,
#friendsTab .overview-profile-action-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(108, 82, 248, 0.3);
  color: #5b35f5;
  box-shadow: 0 14px 28px rgba(108, 82, 248, 0.12);
  outline: none;
}

#friendsTab .overview-profile-action-button i {
  font-size: 16px;
}

#friendsTab .overview-profile-action-button-danger {
  color: #b42318;
}

#friendsTab .overview-profile-action-button-danger:hover,
#friendsTab .overview-profile-action-button-danger:focus-visible {
  border-color: rgba(217, 45, 32, 0.28);
  color: #b42318;
  box-shadow: 0 14px 28px rgba(217, 45, 32, 0.1);
}

#friendsTab .overview-profile-action-button.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 520px) {
  #friendsTab .overview-profile-modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  #friendsTab .overview-profile-modal {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 28px;
  }

  #friendsTab .overview-profile-modal-header {
    padding: 20px 18px 10px;
  }

  #friendsTab .overview-profile-prompt-body {
    max-height: calc(100dvh - 126px);
    padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  }

  #friendsTab .overview-profile-detail-list {
    grid-template-columns: 1fr;
  }

  #friendsTab .overview-profile-action-grid {
    grid-template-columns: 1fr;
  }

  #friendsTab .overview-profile-action-button {
    min-height: 48px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0 15px;
  }
}

/* Mobile overview modals: hide the lower navigation while inspecting profile or adding tasks/shopping. */
@media (max-width: 820px) {
  body.overview-profile-modal-open .mobile-bottom-nav,
  body.overview-task-modal-open .mobile-bottom-nav,
  body.overview-shopping-modal-open .mobile-bottom-nav,
  body:has(#overviewProfileModalBackdrop:not([hidden])) .mobile-bottom-nav,
  body:has(#overviewTasksModalBackdrop:not([hidden])) .mobile-bottom-nav,
  body:has(#overviewShoppingModalBackdrop:not([hidden])) .mobile-bottom-nav {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(120%) !important;
  }

  body.overview-profile-modal-open #friendsTab .overview-profile-modal-backdrop,
  body:has(#overviewProfileModalBackdrop:not([hidden])) #friendsTab .overview-profile-modal-backdrop,
  body.overview-task-modal-open #friendsTab .overview-task-modal-backdrop,
  body.overview-shopping-modal-open #friendsTab .overview-shopping-modal-backdrop,
  body:has(#overviewTasksModalBackdrop:not([hidden])) #friendsTab .overview-task-modal-backdrop,
  body:has(#overviewShoppingModalBackdrop:not([hidden])) #friendsTab .overview-shopping-modal-backdrop {
    z-index: 6000 !important;
  }

  body.overview-profile-modal-open #friendsTab .overview-profile-modal,
  body.overview-task-modal-open #friendsTab .overview-task-modal,
  body.overview-shopping-modal-open #friendsTab .overview-shopping-modal {
    max-height: calc(100dvh - 24px) !important;
  }
}


/* =========================================================
   Mobile nav map icon reset
   ========================================================= */
@media (max-width: 820px) {
  .mobile-bottom-nav .side-tab:nth-child(3) {
    grid-column: auto !important;
    justify-self: stretch !important;
    align-self: center !important;
    width: auto !important;
    height: 58px !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 58px !important;
    max-height: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    isolation: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #8b93a9 !important;
    transform: none !important;
    filter: none !important;
  }

  .mobile-bottom-nav .side-tab:nth-child(3)::before,
  .mobile-bottom-nav .side-tab:nth-child(3)::after {
    content: none !important;
    display: none !important;
  }

  .mobile-bottom-nav .side-tab:nth-child(3) i,
  .mobile-bottom-nav .side-tab:nth-child(3) svg,
  .mobile-bottom-nav .side-tab:nth-child(3) img {
    position: static !important;
    z-index: auto !important;
    color: currentColor !important;
    fill: currentColor !important;
    width: auto !important;
    height: auto !important;
    font-size: 21px !important;
    line-height: 1 !important;
    margin: 0 !important;
    filter: none !important;
  }

  .mobile-bottom-nav .side-tab:nth-child(3) span,
  .mobile-bottom-nav .side-tab:nth-child(3) .nav-label {
    display: block !important;
  }

  .mobile-bottom-nav .side-tab:nth-child(3).active {
    background: linear-gradient(135deg, rgba(91, 53, 245, 0.16), rgba(91, 53, 245, 0.08)) !important;
    color: var(--primary) !important;
  }

  .mobile-bottom-nav .side-tab:nth-child(3):active {
    transform: none !important;
  }
}

/* =========================================================
   Overview viewport-fit cards
   Keep Home cards sized to the available screen and scroll
   their own contents instead of growing the page.
   ========================================================= */
#friendsTab .overview-card-shell,
#friendsTab .overview-task-shopping-carousel,
#friendsTab .overview-task-shopping-track,
#friendsTab .overview-task-shopping-slide,
#friendsTab .overview-card-inner {
  min-height: 0;
}

#friendsTab .overview-card-title-row {
  flex: 0 0 auto;
}

#friendsTab .overview-plans-sections,
#friendsTab .overview-tasks-list,
#friendsTab .overview-shopping-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

#friendsTab .overview-plans-sections,
#friendsTab .overview-tasks-list,
#friendsTab .overview-shopping-list {
  padding-right: 4px;
}

@media (min-width: 821px) {
  #friendsTab .overview-page-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  #friendsTab .overview-dashboard {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: 0;
  }

  #friendsTab .overview-grid.overview-grid-compact {
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }

  #friendsTab .overview-plans-card,
  #friendsTab .overview-task-shopping-carousel {
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  #friendsTab .overview-task-shopping-track {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }

  #friendsTab .overview-task-shopping-slide.overview-card-shell,
  #friendsTab .overview-card-shell {
    height: 100%;
    min-height: 0;
  }

  #friendsTab .overview-card-inner {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #friendsTab .overview-plans-card .overview-card-inner,
  #friendsTab .overview-task-shopping-slide .overview-card-inner {
    display: flex;
    flex-direction: column;
  }

  #friendsTab .overview-task-shopping-pagination {
    flex: 0 0 auto;
  }
}

@media (max-width: 820px) {
  body:has(#friendsTab.active) #friendsTab .overview-card-inner {
    overflow: hidden;
  }

  body:has(#friendsTab.active) #friendsTab .overview-plans-card {
    min-height: 0;
    max-height: min(34dvh, 230px);
  }

  body:has(#friendsTab.active) #friendsTab .overview-plans-card .overview-card-inner {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body:has(#friendsTab.active) #friendsTab .overview-plans-sections,
  body:has(#friendsTab.active) #friendsTab .overview-tasks-list,
  body:has(#friendsTab.active) #friendsTab .overview-shopping-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

#friendsTab .overview-card-shell,
#friendsTab .overview-card-inner,
#friendsTab .overview-task-shopping-carousel,
#friendsTab .overview-task-shopping-track,
#friendsTab .overview-task-shopping-slide {
  box-sizing: border-box;
}

/* Overview Tasks/Shopping: View all opens a list-only prompt instead of the add prompt. */
#friendsTab .overview-task-modal.is-view-only .overview-task-form,
#friendsTab .overview-task-modal.is-view-only .overview-task-private-toggle {
  display: none !important;
}

#friendsTab .overview-task-modal.is-view-only .overview-task-modal-list {
  flex: 1 1 auto;
  min-height: 320px;
  overflow-y: auto;
  padding-top: 14px;
  -webkit-overflow-scrolling: touch;
}

#friendsTab .overview-task-modal.is-view-only .overview-task-row:first-child,
#friendsTab .overview-task-modal.is-view-only .overview-shopping-row:first-child {
  padding-top: 2px;
}

@media (max-width: 820px) {
  #friendsTab .overview-task-modal.is-view-only .overview-task-modal-list {
    min-height: 0;
    max-height: calc(100dvh - 124px);
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
}
