.family-page{--family-ink:#27243a;--family-muted:#625e74;--family-accent:#684ab0;--family-soft:#f1ebfb;color:var(--family-ink);display:grid;gap:20px;margin:0 auto;max-width:720px}
.family-page h2,.family-page h3,.family-page p,.family-dialog p{margin:0}
.family-page button,.family-dialog button{font:inherit;cursor:pointer}
.family-page a{color:var(--family-accent);font-weight:650}
.family-surface{background:#fff;border:1px solid #e9e3f3;border-radius:16px}
.family-page .family-panel{margin:0;padding:16px;background:#fff;border-color:#e9e3f3}
.family-roster{display:flex;flex-wrap:wrap;gap:10px;align-items:start}
.family-roster button{display:grid;justify-items:center;gap:6px;width:57px;min-height:64px;border:0;background:none;padding:0;color:inherit;font-size:12px;overflow-wrap:anywhere}
.family-page .family-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;flex:none;background:var(--family-soft);color:var(--family-accent);font-size:16px;font-weight:700}
.family-roster button[aria-pressed=true] .family-avatar{background:var(--family-accent);color:#fff;outline:2px solid #d9ccf1;outline-offset:2px}
.family-roster button:disabled{color:var(--family-muted);cursor:default}
.family-avatar.family-add{background:#fff;border:1px dashed #9c85c8}
.family-strip-foot{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;margin-top:12px;font-size:13px;color:var(--family-muted)}
.family-block{display:grid;gap:9px}
.family-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.family-section-heading h2,.family-grant h2{font-size:17px}
.family-section-heading a{font-size:13px;min-height:44px;display:flex;align-items:center}
.family-entry{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;text-align:left;width:100%;min-height:65px;padding:12px 14px;color:inherit;background:#fff}
.family-entry:not(.family-surface){border:0;border-radius:inherit}
.family-entry+.family-entry{border-top:1px solid #eeeaf4}
.family-entry strong,.family-entry small{display:block}
.family-entry small,.family-share p,.family-request p,.family-grant-person p{margin-top:4px;color:var(--family-muted,#625e74);font-size:12px}
.family-entry-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--family-soft);color:var(--family-accent)}
.family-share,.family-request{padding:12px;display:flex;align-items:center;gap:9px;overflow-wrap:anywhere}
.family-share>div,.family-request>div:first-child{flex:1;min-width:0}
.family-share+.family-share,.family-request+.family-request{border-top:1px solid #eeeaf4}
.family-status{white-space:nowrap;color:#625e74;background:#f2f0f5;border-radius:20px;padding:4px 7px;font-size:11px}
.family-status.active{color:#6243a1;background:#f1ebfb}
.family-empty{padding:16px;color:var(--family-muted)}
.family-grant{padding:14px;min-width:0}
.family-grant-person{display:flex;gap:10px;align-items:center;margin-bottom:12px;overflow-wrap:anywhere}
.family-grant table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px}
.family-grant th,.family-grant td{padding:4px 3px;text-align:center;border-bottom:1px solid #eeeaf4}
.family-grant th:first-child{text-align:left;width:27%}
.family-grant th small{display:block;font-weight:400;color:var(--family-muted)}
.family-switch{display:inline-grid;place-items:center;min-width:46px;min-height:44px;position:relative;cursor:pointer}
.family-switch input{position:absolute;opacity:0;width:44px;height:44px;cursor:pointer;margin:0}
.family-switch span{width:36px;height:22px;background:#b9b4c6;border-radius:20px;padding:3px;pointer-events:none}
.family-switch span::before{content:"";display:block;width:16px;height:16px;border-radius:50%;background:white}
.family-switch input:checked+span{background:var(--family-accent)}
.family-switch input:checked+span::before{transform:translateX(14px)}
.family-switch input:focus-visible+span{outline:2px solid var(--family-accent);outline-offset:4px}
.family-unavailable{font-size:12px;color:var(--family-muted)}
.family-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.family-grant>.family-actions,.family-management .family-actions{margin-top:12px}
.family-actions button{min-height:44px;padding:6px 10px;border:1px solid #e6def2;border-radius:10px;color:#5d4299;background:#fff}
.family-actions button[type=submit],.family-actions button[data-accept=true]{background:#684ab0;color:#fff}
.family-actions button:disabled{opacity:.65;cursor:default}
.family-inline-error,#family-error{color:#a02849;margin-top:6px!important;font-size:13px}
.family-management{display:grid;gap:14px}
.family-management form{border-bottom:1px solid #eeeaf4;padding-bottom:12px}
.family-management h3{margin:0}
.family-history{list-style:none;padding:0}
.family-history li{padding:10px 0;border-bottom:1px solid #eeeaf4}
.family-history time{font-size:12px;color:#625e74}
.health-metric.restricted{cursor:default}
.family-roster-slot{position:relative}
.family-roster-slot [data-family-hold]{touch-action:pan-y;user-select:none;-webkit-touch-callout:none}
.family-roster-slot [aria-disabled=true]{color:var(--family-muted)}
.family-roster-slot .family-remove-badge{position:absolute;top:-8px;right:-8px;width:44px;min-height:44px;display:grid;place-items:start end;padding:1px 5px;color:white;font-size:17px;line-height:22px;font-weight:700;isolation:isolate}
.family-remove-badge::before{content:'';position:absolute;right:0;top:1px;width:24px;height:24px;border-radius:50%;background:#bc3458;z-index:-1}
.family-strip-foot button{min-height:44px;margin:-9px 0;padding:3px 8px;background:transparent;border:0;color:var(--family-accent);font-weight:650}
.family-invitations-page h1{margin:0;font-size:24px}
.family-invitations-page>p{color:var(--family-muted)}
