.family-workspace{max-width:1400px;margin:auto;color:var(--text)}
.family-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--border-soft);padding:0 0 14px;margin-bottom:18px}.family-tabs [aria-current=page]{border-color:var(--accent);color:var(--text);background:var(--surface-raised);box-shadow:inset 0 -3px var(--accent)}
.family-filters,.family-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.family-filters{margin-bottom:18px;justify-content:space-between}.family-filters select{min-width:180px}.family-workspace select,.family-dialog input,.family-dialog select{font-size:16px;min-height:44px;max-width:100%;box-sizing:border-box}.family-workspace .button,.family-dialog .button{min-height:44px;white-space:normal}
.family-week-heading{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:20px 0}.family-week-heading h2{font-size:20px;margin:0;flex:1;min-width:180px}.family-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.family-day{border:1px solid var(--border-soft);background:var(--surface);min-width:0;padding:10px;border-radius:12px}.family-day.is-today{border-color:var(--accent)}.family-day>header{margin-bottom:12px}.family-day>header>span{color:var(--text-secondary);font-size:12px;text-transform:uppercase;letter-spacing:.12em}.family-day h3{font-size:14px;margin:6px 0;line-height:1.5}.family-free{font-size:13px;color:var(--text-secondary);padding:10px 0}
.family-event{display:grid;gap:6px;width:100%;border:1px solid var(--border-soft);border-left:3px solid var(--family-color);background:var(--surface-raised);color:var(--text);text-align:left;padding:12px 10px;border-radius:6px;margin:8px 0;cursor:pointer;font:inherit;overflow-wrap:anywhere;min-height:90px}.family-event time,.family-event span,.family-event small{font-size:12px;line-height:1.5;color:var(--text-secondary)}.family-event strong{font-size:14px}.family-event:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.family-event.is-cancelled{border-style:dashed}.family-event.is-cancelled strong{text-decoration:line-through}
.family-person{display:inline-flex;gap:9px;align-items:center;font-weight:600;overflow-wrap:anywhere}.family-person i{width:10px;height:10px;flex-shrink:0;border-radius:50%;border:1px solid var(--border-soft)}.family-children{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:16px}.family-profile p,.family-preparation p,.family-section-head p,.family-next p,.family-caption,.family-privacy{color:var(--text-secondary);font-size:14px;line-height:1.7}.family-profile{margin:0}.family-profile .family-person{font-size:22px}.family-preparation,.family-section-head,.family-next{display:flex;justify-content:space-between;gap:18px;align-items:center}.family-preparation>div{min-width:0}.family-preparation h3{font-size:19px;overflow-wrap:anywhere;margin:10px 0}.family-preparation label{display:grid;gap:5px;font-size:12px}.family-preparation.is-done{border-style:dashed}.family-section-head{margin:22px 0}.family-section-head h2,.family-next h2{font-size:21px;margin:0}.family-section-head p,.family-next p{margin:7px 0}.family-next{margin-top:18px}.family-empty{text-align:center;padding:36px 24px;max-width:620px;margin:25px auto}.family-empty>span{font-size:46px;color:var(--accent)}.family-empty p{max-width:440px;margin:12px auto 22px;line-height:1.7;color:var(--text-secondary)}.family-caption{margin-top:18px}.family-privacy{border-top:1px solid var(--border-soft);padding-top:18px;margin-top:28px}.family-privacy summary{cursor:pointer;min-height:44px}
.family-dialog{background:var(--surface);color:var(--text);border:1px solid var(--border-soft);border-top:3px solid var(--accent);border-radius:12px;width:min(560px,calc(100vw - 24px));padding:0;max-height:90dvh;box-sizing:border-box}.family-dialog::backdrop{background:#0009}.family-dialog form{display:flex;flex-direction:column;max-height:inherit}.family-dialog header,.family-dialog footer{display:flex;align-items:center;gap:10px;padding:16px;border-bottom:1px solid var(--border-soft);flex-shrink:0;flex-wrap:wrap}.family-dialog header h2{margin:0;font-size:21px;flex:1}.family-dialog header button{min-width:44px;min-height:44px;background:none;border:0;color:var(--text);font-size:28px}.family-dialog footer{border-top:1px solid var(--border-soft);border-bottom:0;justify-content:flex-end}.family-dialog-body{overflow:auto;overscroll-behavior:contain;padding:18px}.family-dialog label{display:grid;gap:7px;font-size:14px;margin-bottom:16px}.family-dialog input,.family-dialog select{width:100%;min-width:0}.family-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.family-dialog p{font-size:14px;line-height:1.65;color:var(--text-secondary)}.family-dialog [role=alert]{color:var(--text)}.family-dialog fieldset{min-width:0;border:1px solid var(--border-soft);padding:12px;margin:0 0 18px}.family-weekdays{display:flex;gap:8px;flex-wrap:wrap}.family-weekdays label{display:flex;align-items:center;min-height:44px;margin:0;gap:6px}.family-weekdays input{width:20px;min-height:20px;height:20px}.family-add-options{display:grid;gap:14px}
body[data-theme=cyber] .family-day.is-today{box-shadow:inset 0 3px var(--accent)}
@media(max-width:1100px){.family-week{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.family-tabs{gap:6px}.family-tabs .button{flex:1;padding:10px 8px;font-size:13px}.family-week{grid-template-columns:1fr;gap:12px}.family-day{padding:14px}.family-day>header{display:flex;align-items:baseline;gap:10px;margin:0}.family-day h3{font-size:16px}.family-event{grid-template-columns:94px 1fr;gap:6px 12px;min-height:70px;margin:10px 0}.family-event time{grid-row:span 2}.family-event small{grid-column:2}.family-free{margin:4px 0;padding:6px 0}.family-preparation,.family-section-head,.family-next{align-items:stretch;flex-direction:column;gap:12px}.family-preparation .family-actions label{flex:1}.family-preparation .family-actions{align-items:flex-end}.family-week-heading{gap:6px}.family-week-heading h2{order:-1;flex-basis:100%;font-size:19px}.family-week-heading .button:last-child{margin-left:auto}.family-dialog{width:calc(100vw - 16px)}.family-dialog footer{padding:12px}.family-dialog footer .button{flex:1}.family-dialog input[type=date],.family-dialog input[type=time]{min-width:0}.family-filters select{min-width:0;width:calc(100% - 110px)}body[data-mobile-view=family] .page-head{display:flex;align-items:center;justify-content:space-between;gap:10px}body[data-mobile-view=family] .page-head .button{font-size:14px;white-space:normal;min-height:44px}.family-children{margin-bottom:16px}}

.family-series{margin-top:22px;border:1px solid var(--border-soft);padding:14px;border-radius:10px}.family-series summary{min-height:44px;cursor:pointer}.family-series article{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--border-soft);padding:14px 0}.family-series article>div{display:grid;gap:8px;min-width:0;overflow-wrap:anywhere}.family-series small{color:var(--text-secondary)}
.family-daily-title{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:24px 0}.family-daily-title h2{font-size:24px;margin:0}.family-daily-title p{color:var(--text-secondary);line-height:1.7;margin:8px 0}.family-today-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.family-today-day{margin:0;min-width:0}.family-today-day>header{border-bottom:1px solid var(--border-soft);padding-bottom:14px}.family-today-day>header>span{color:var(--accent);font-size:13px;text-transform:uppercase;letter-spacing:.12em}.family-today-day h3{font-size:23px;margin:8px 0 0}.family-today-event{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 0;border-bottom:1px solid var(--border-soft)}.family-today-event:last-child{border-bottom:0}.family-today-event>div{min-width:0}.family-today-event h4{font-size:20px;margin:10px 0;overflow-wrap:anywhere}.family-today-event p{font-size:14px;line-height:1.7;color:var(--text-secondary);margin:5px 0}.family-today-event.is-cancelled h4{text-decoration:line-through}.family-daily-prep{display:flex;justify-content:space-between;gap:14px;align-items:center}.family-daily-prep>div:first-child{display:grid;gap:9px;min-width:0;overflow-wrap:anywhere}.family-daily-prep p{color:var(--text-secondary);margin:0;line-height:1.7;font-size:14px}.family-conflicts{border:1px solid var(--accent);padding:16px;border-radius:10px;margin-bottom:20px}.family-conflicts summary{cursor:pointer;font-weight:600;min-height:44px}.family-conflicts article{padding:14px 0;border-top:1px solid var(--border-soft)}.family-conflicts p{color:var(--text-secondary);line-height:1.7;font-size:14px}.family-packing label,.family-dialog .family-toggle{display:flex;align-items:center;gap:12px;min-height:44px;overflow-wrap:anywhere}.family-packing input,.family-dialog .family-toggle input{width:22px;height:22px;min-height:22px;flex-shrink:0}.family-dialog textarea{font-size:16px;min-height:130px;width:100%;box-sizing:border-box;resize:vertical}.family-dialog [data-family-preview-result]{margin-top:16px;max-height:260px;overflow:auto;overscroll-behavior:contain}.family-dialog [data-family-preview-result]:empty{display:none}
@media(max-width:760px){.family-tabs .button{flex:1 1 calc(50% - 8px);font-size:14px}.family-today-grid{grid-template-columns:1fr}.family-today-event{align-items:stretch;flex-direction:column}.family-today-event .family-actions .button{flex:1}.family-daily-title{align-items:stretch;flex-direction:column;gap:8px}.family-daily-title h2{font-size:22px}.family-daily-prep{align-items:stretch;flex-direction:column}.family-today-day{padding:18px}.family-series article{align-items:stretch;flex-direction:column}.family-series article .button{flex:1}}
.family-filters .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:760px){
 body[data-mobile-view=family] #main .page-head{flex-direction:row;justify-content:space-between;align-items:center;gap:8px;padding:6px 0 12px;margin-bottom:12px}
 body[data-mobile-view=family] #main .page-head>div:first-child{min-width:0;text-align:left}
 body[data-mobile-view=family] #main .page-head h1{font-size:22px;text-align:left;margin:0}
 body[data-mobile-view=family] #main .page-head .page-actions{width:auto;flex:none}
 body[data-mobile-view=family] #main .page-head .page-actions .button{width:auto;flex:none;padding:10px}
 .family-tabs{flex-wrap:nowrap;gap:4px;padding-bottom:10px;margin-bottom:12px}
 .family-tabs .button{flex:1 1 0;min-width:0;padding:8px 4px;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
 .family-filters{margin-bottom:12px}
 .family-daily-title{flex-direction:row;align-items:center;margin:14px 0;gap:10px}
 .family-daily-title>div{min-width:0}
 .family-daily-title h2{font-size:20px;line-height:1.35}
 .family-daily-title p{display:none}
 .family-daily-title>.button{max-width:145px;font-size:13px;padding:8px;flex-shrink:0}
}

/* Leave room for the full native date and its picker on narrow phones. */
@media (max-width: 360px) {
  .family-dialog .family-date-row { grid-template-columns: minmax(0, 1fr); }
}
