.family-children {
  display: grid;
  gap: 1rem;
}
.family-child > section,
.family-child > details {
  margin-top: 1.25rem;
}
.family-child h4 {
  margin: 0 0 0.6rem;
}
.family-child > .family-overview {
  margin-top: 1.25rem;
}
.family-overview > .panel {
  min-width: 0;
}
.family-more {
  margin-top: 0.75rem;
}
.family-more > summary {
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  color: var(--club-text);
  font-size: 0.8rem;
}
.family-more .parent-task-list {
  margin-top: 0.5rem;
}
@media (max-width: 760px) {
  #app-screen .family-overview {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
.family-child .muted {
  font-size: 0.82rem;
  line-height: 1.5;
}
.family-event {
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}
.family-event > div:first-child {
  min-width: 0;
  flex: 1;
}
.family-event small {
  display: block;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
}
.family-response-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.family-planned {
  display: block;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.family-child summary {
  cursor: pointer;
  font-weight: 600;
}
#family-response-form {
  display: grid;
  gap: 0.8rem;
}
#family-response-form [role="alert"] {
  color: var(--danger);
}
@media (max-width: 760px) {
  .family-event {
    align-items: stretch;
    flex-direction: column;
  }
  .family-response-actions {
    justify-content: space-between;
  }
  .family-child {
    min-width: 0;
  }
  .family-child .table-wrap {
    max-width: 100%;
    overflow: auto;
  }
}

/* The family overview presents the linked child's identity and actual records at a glance. */
#view-child .family-child-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}
#view-child .family-child-identity{display:flex;align-items:center;gap:1rem;min-width:0}
#view-child .family-child-identity>div:last-child{min-width:0}
#view-child .family-child-identity h3{margin:0;overflow-wrap:anywhere}
#view-child .family-child-identity p{margin:.4rem 0 0;color:var(--muted);font-size:.85rem;line-height:1.5}
#view-child .family-child-photo{position:relative;width:5rem;height:5rem;flex:0 0 5rem;overflow:hidden;border:1px solid var(--club-border);border-radius:var(--radius,1rem);background:var(--club-soft);color:var(--club-text);font-size:1.5rem}
#view-child .family-child-photo img{display:block;width:100%;height:100%;object-fit:cover}
#view-child .family-child-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
#view-child .family-child-stat{display:grid;grid-template-columns:2.25rem minmax(0,1fr);grid-template-areas:"icon label" "icon value" "hint hint";gap:.2rem .65rem;padding:.85rem;border:1px solid var(--club-border);border-radius:var(--radius,1rem);background:var(--surface);min-width:0}
#view-child .family-child-stat-icon{grid-area:icon;display:grid;place-items:center;align-self:center;width:2.25rem;height:2.25rem;border-radius:.75rem;background:var(--club-soft);color:var(--club-text)}
#view-child .family-child-stat-label{grid-area:label;color:var(--muted);font-size:.75rem;line-height:1.4}
#view-child .family-child-stat strong{grid-area:value;color:var(--club-text);font-size:1.4rem;line-height:1.35;overflow-wrap:anywhere}
#view-child .family-child-stat small{grid-area:hint;margin-top:.35rem;color:var(--muted);font-size:.7rem;line-height:1.5}
#view-child .family-stat-period{margin:.6rem 0 0;font-size:.7rem;color:var(--muted);line-height:1.5}
@media(max-width:1100px){#view-child .family-child-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#view-child .family-child-header{flex-wrap:wrap}#view-child .family-child-identity{gap:.7rem}#view-child .family-child-photo{width:4rem;height:4rem;flex-basis:4rem}#view-child .family-child-stat{padding:.65rem;grid-template-columns:1.9rem minmax(0,1fr);gap:.2rem .45rem}#view-child .family-child-stat-icon{width:1.9rem;height:1.9rem}#view-child .family-child-stat strong{font-size:1.2rem}}
