#familyPage.family-organized [hidden] { display: none !important; }
#familyPage .family-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 24px 0; }
#familyPage .family-tabs button, #familyPage .family-elder-choices button { min-height: 56px; white-space: normal; font-size: 1.05rem; border: 2px solid #d6e1dc; background: #fff; color: #315b4b; border-radius: 14px; }
#familyPage .family-tabs [aria-selected="true"], #familyPage .family-elder-choices [aria-pressed="true"] { background: #315b4b; color: #fff; border-color: #315b4b; font-weight: 700; }
#familyPage.family-organized button:focus-visible, #familyPage.family-organized summary:focus-visible { outline: 3px solid #a64c26; outline-offset: 3px; }
#familyPage .family-picker { margin-bottom: 16px; }
#familyPage .family-picker-label { font-weight: 700; margin: 0 0 10px; }
#familyPage .family-elder-choices { display: flex; flex-wrap: wrap; gap: 10px; }
#familyPage .family-elder-choices button { min-width: 120px; max-width: 100%; overflow-wrap: anywhere; }
#familyPage .family-view-status { font-size: .95rem; color: #625e56; margin-bottom: 16px; }
#familyPage .family-tab-panel > h2 { font-size: 1.4rem; margin: 0 0 18px; }
#familyPage .family-tab-panel .settings-section, #familyPage .family-tab-panel .org-card,
#familyPage .family-empty-state { background: #fff; border: 1px solid #dfddd5; border-radius: 20px; padding: 24px; margin-bottom: 20px; box-shadow: none; }
#familyPage .family-tab-panel .org-cards { display: block; }
#familyPage .family-tab-panel .org-card { width: 100%; min-width: 0; border-top: 1px solid #dfddd5; }
#familyPage .family-tab-panel .org-card.red, #familyPage .family-tab-panel .org-card.yellow, #familyPage .family-tab-panel .org-card.green { background: #fff; border-color: #dfddd5; }
#familyPage.family-organized .fam-manage-row .fm-threshold { flex-wrap: wrap; }
#familyPage.family-organized .org-card .oc-actions .btn { font-size: 1rem; }
#familyPage .fam-dash-title { display: none; }
#familyPage .family-card-overview .oc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
#familyPage .family-card-overview .st { padding: 16px; background: #f5f7f4; border-radius: 12px; overflow-wrap: anywhere; }
#familyPage .family-overview-links, #familyPage .family-card-records .oc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
#familyPage .family-overview-links button, #familyPage .family-card-records .oc-actions button { flex: 1 1 180px; min-height: 56px; white-space: normal; }
#familyPage .family-all-alerts, #familyPage .family-notifications { margin: 0 0 20px; border: 1px solid #dfddd5; border-radius: 16px; background: #fff; padding: 0 18px; }
#familyPage .family-all-alerts summary, #familyPage .family-notifications summary { padding: 18px 0; min-height: 56px; cursor: pointer; font-weight: 700; }
#familyPage .family-manage-person { border-top: 1px solid #dfddd5; margin-top: 18px; padding-top: 18px; }
#familyPage.family-organized .btn, #familyPage.family-organized select { min-height: 56px; white-space: normal; }
#familyPage .family-tab-panel { min-width: 0; }
#familyPage .family-access-notice p { line-height: 1.8; }
#familyPage .family-access-notice a { min-height: 56px; white-space: normal; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 600px) {
    #familyPage .family-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #familyPage .family-tab-panel .settings-section, #familyPage .family-tab-panel .org-card, #familyPage .family-empty-state { padding: 18px 14px; }
    #familyPage .family-overview-links, #familyPage .family-card-records .oc-actions { display: grid; grid-template-columns: 1fr; }
    #familyPage .family-card-overview .oc-stats { grid-template-columns: 1fr; }
    #familyPage .family-tab-panel .family-bind-form { flex-direction: column; align-items: stretch; }
    #familyPage .family-tab-panel input, #familyPage .family-tab-panel select { min-width: 0; max-width: 100%; }
}

/* Daily records: selected B segmented tabs; one mounted panel visible at a time. */
#familyPage .family-record-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; margin: 24px 0; background: #f4eee8; border-radius: 12px; }
#familyPage .family-record-tabs button { appearance: none; border: 0; border-radius: 8px; background: transparent; color: #75665c; font: inherit; font-size: 1rem; min-height: 52px; padding: 10px 8px; cursor: pointer; }
#familyPage .family-record-tabs button:hover { background: #eadbd0; color: #783b24; }
#familyPage .family-record-tabs [aria-selected="true"] { background: #a64f2e; color: #fff; font-weight: 700; }
#familyPage .family-card-records > [role="tabpanel"] { border-top: 0; margin-top: 0; padding-top: 0; }
#familyPage .family-card-records > [role="tabpanel"]:focus-visible { outline: 2px solid #a64f2e; outline-offset: 4px; }
@media (max-width: 600px) {
    #familyPage .family-record-tabs { gap: 2px; padding: 4px; }
    #familyPage .family-record-tabs button { font-size: .875rem; padding: 10px 2px; min-height: 48px; }
}
