/* Buist Family Calendar v4: compact family-first interface. */
:root{--buist-ink:#172337;--buist-blue:#2862df;--buist-border:#e4e9f1;--buist-bg:#f6f8fb;color:var(--buist-ink);background:var(--buist-bg)}
.main-area{background:var(--buist-bg)}
.sidebar{width:232px;min-width:232px;border-right-color:var(--buist-border)}
.side-top{padding:21px 19px 21px}
.brand-icon{background:#2862df;box-shadow:none;border-radius:12px}
.brand-dot{display:none}
.brand small{letter-spacing:.10em;font-size:9px;color:#9da7b8}
.side-quick .btn.primary{box-shadow:none}
.new-btn{margin:6px 16px 19px}
.side-section{padding:0 12px 20px}.side-heading{letter-spacing:.08em}
.side-link.active,.side-link:hover{background:#ebf1ff;color:#235acf}
.member-option{padding:6px 12px}.member-avatar{border-radius:50%;width:28px;height:28px}
.topbar{height:59px;padding:0 28px;border-bottom:1px solid var(--buist-border)}
.topbar-breadcrumb{letter-spacing:.09em}
.home-page.v4-home{max-width:1500px;padding:26px 31px 24px}
.home-command{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px}
.home-command .eyebrow{font-size:10px;font-weight:780;color:#73839b;letter-spacing:.105em}
.home-command h1{font-weight:770;font-size:clamp(24px,2.4vw,34px);letter-spacing:-.05em;margin:6px 0 3px;color:#172337}
.home-command h1 span{color:#2b62d9}
.home-command p{color:#8592a4;font-size:12px;margin:0}
.command-actions{display:flex;gap:9px;align-items:center}
.command-actions .btn{box-shadow:none;min-height:39px}
.command-actions .btn.light{background:#fff;border-color:#e0e6ee;color:#44546b}
.home-utility{display:flex;gap:16px;justify-content:space-between;align-items:center;margin-bottom:14px}
.family-filters{display:flex;align-items:center;gap:7px;min-width:0;overflow-x:auto;scrollbar-width:none;padding:2px 0;white-space:nowrap}
.family-filters::-webkit-scrollbar{display:none}
.family-chip{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;border:1px solid #e1e7f0;border-radius:999px;background:#fff;color:#52647b;font-size:11px;font-weight:750;padding:8px 13px;min-height:34px}
.family-chip i{display:inline-block;width:8px;height:8px;flex:0 0 8px;border-radius:50%}
.family-chip.is-selected{background:#e7eeff;border-color:#cbdafc;color:#2358c3}
.synced-note{white-space:nowrap;font-size:10px;font-weight:650;color:#7b8a9d;display:inline-flex;align-items:center;gap:6px}
.synced-note .live-dot{width:7px;height:7px}
.week-peek{background:#fff;border:1px solid #e4eaf2;border-radius:15px;box-shadow:0 2px 10px #1a2d4b06;padding:15px 16px 14px;margin-bottom:15px}
.week-peek-title{display:flex;align-items:center;justify-content:space-between;padding:0 4px 12px}
.week-peek-title b{font-size:13px;font-weight:790}
.week-peek-title button{border:0;background:none;display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:730;color:#2d62c9}
.week-peek-title svg{width:14px;height:14px}
.week-peek-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.peek-day{min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;border:1px solid #eff1f6;border-radius:11px;background:#fafbfd;padding:11px 5px 9px;min-height:96px;color:#708096;transition:background .15s,border-color .15s}
.peek-day:hover{background:#f2f6ff;border-color:#cbd9f7}.peek-day.is-today{background:#eaf1ff;color:#244fba;border-color:#ceddff}
.peek-day>span:first-child{font-size:10px;font-weight:800}.peek-day strong{font-size:24px;font-weight:820;letter-spacing:-.06em;line-height:1.05;color:#25344a}
.peek-day.is-today strong{color:#245dd0}.peek-day small{font-size:10px;color:#8695a7;font-weight:650}
.peek-dots{display:flex;justify-content:center;align-items:center;gap:4px;height:7px}.peek-dots i{width:6px;height:6px;border-radius:50%;display:block}
.home-workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(315px,.9fr);gap:15px;align-items:stretch}
.v4-panel{background:#fff;border:1px solid #e4eaf1;border-radius:15px;padding:19px 21px;box-shadow:0 3px 12px #1a2d4b06;min-width:0}
.v4-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.v4-panel-heading h2{font-size:17px;margin:4px 0 0;font-weight:780;letter-spacing:-.035em}
.v4-panel-heading .eyebrow{font-size:9px;letter-spacing:.1em;color:#8291a4}
.v4-panel-heading em{font-size:11px;font-style:normal;color:#6981a6;background:#eff3fa;border-radius:999px;padding:3px 7px;margin-left:5px;vertical-align:middle}
.v4-panel-heading .text-action{white-space:nowrap;font-size:10px;display:inline-flex;align-items:center;gap:3px}.v4-panel-heading .text-action svg{width:13px;height:13px}
.home-agenda{min-height:380px}.home-side-stack{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:15px}
.v4-home .overview-event{border:1px solid #edf0f6;background:#fbfcfe;border-radius:10px;margin:7px 0;box-shadow:none;min-height:58px}
.v4-home .overview-event-time{font-size:11px}.v4-home .overview-event-info strong{font-size:12px}
.v4-empty{padding:26px 10px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;color:#71819a}
.v4-empty>span{height:39px;width:39px;border-radius:12px;display:grid;place-items:center;background:#eff4ff;color:#3765cd}.v4-empty svg{width:19px;height:19px}
.v4-empty b{font-size:13px;color:#3e4b60}.v4-empty p{font-size:11px;margin:0}.v4-empty .btn{margin-top:5px}
.v4-next-heading{font-size:9px;letter-spacing:.15em;color:#8c9aaf;font-weight:800;border-top:1px solid #edf1f6;padding-top:15px;margin-top:12px;margin-bottom:4px}
.v4-upcoming-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:0;border-bottom:1px solid #f0f2f6;background:none;padding:10px 3px;color:#425069}
.v4-upcoming-item:last-child{border-bottom:none}.v4-upcoming-item>div:nth-of-type(2){flex:1;min-width:0}
.v4-upcoming-item strong{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v4-upcoming-item small{display:block;color:#90a0b2;font-size:10px;margin-top:4px}.v4-upcoming-item>i{height:28px;width:3px;border-radius:4px}
.v4-upcoming-item>svg{width:15px;height:15px;color:#9eaabd}
.v4-up-date{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:32px}.v4-up-date b{font-size:17px;line-height:1}.v4-up-date span{font-size:9px;text-transform:uppercase;font-weight:750;color:#9ba7b7;margin-top:3px}.v4-none{font-size:11px;color:#91a0b0}
.v4-panel .home-list{min-height:0}.v4-panel .mini-task,.v4-panel .mini-shopping{padding:8px 0}.v4-panel .mini-task-content strong,.v4-panel .mini-shopping>span{font-size:11px}
.v4-panel .add-inline{margin-top:10px}.v4-panel .quick-shop-form{margin-top:11px}
.v4-home .home-footer{margin-top:18px;color:#a9b2bf}
.v4-calendar{padding-top:24px}.calendar-intro{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.calendar-intro h1{font-size:28px;letter-spacing:-.05em;margin:5px 0 0}.calendar-intro .eyebrow{font-size:10px}
.calendar-toolbar{padding-top:0;margin-bottom:13px}.v4-calendar .calendar-toolbar h2{font-size:18px}
.calendar-utils{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:13px}
.calendar-utils .family-filters{max-width:70%}.calendar-utils .cal-search{margin:0;width:240px;flex-shrink:0}
.calendar-content .calendar-card{overflow:hidden}.calendar-card:has(.agenda-range){padding:12px 20px}
.agenda-range-head{display:flex;justify-content:space-between;align-items:center;padding:8px 2px 14px;border-bottom:1px solid #edf0f5}
.agenda-range-head b{font-size:13px}.agenda-range-head span{font-size:10px;color:#8191a6}
.agenda-date-group{padding:13px 0;border-bottom:1px solid #edf0f5}.agenda-date-group:last-child{border-bottom:0}
.agenda-date-header{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.agenda-date-header>div{display:flex;flex-direction:column;gap:3px}.agenda-date-header>div>b{font-size:12px}.agenda-date-header>div>small{font-size:10px;color:#98a5b7}
.agenda-date-tile{width:42px;height:47px;border:1px solid #e7edf5;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#f6f8fc}
.agenda-date-tile.is-today{background:#ebf2ff;border-color:#cadafa}.agenda-date-tile small{font-size:9px;color:#72869e;font-weight:760}.agenda-date-tile strong{font-size:19px;color:#243e68;line-height:1.1}
.date-add{border:1px solid #e4eaf1;background:#fff;border-radius:8px;width:31px;height:31px;display:grid;place-items:center;margin-left:auto;color:#5274c0}
.date-add svg{width:15px;height:15px}
.agenda-date-events{margin-left:54px;display:flex;flex-direction:column}
.agenda-range-event{width:100%;display:flex;align-items:center;gap:10px;padding:10px 6px;border:0;border-bottom:1px solid #f3f4f7;background:none;text-align:left}
.agenda-range-event:last-child{border-bottom:0}.agenda-range-event>i{width:4px;height:30px;border-radius:10px;flex-shrink:0}
.agenda-range-time{font-size:11px;font-weight:760;color:#65748a;min-width:53px}
.agenda-range-info{min-width:0;flex:1}.agenda-range-info b{display:block;font-size:12px;color:#28374d}.agenda-range-info small{display:block;color:#91a0b0;font-size:10px;margin-top:4px}
.agenda-range-event>svg{width:15px;height:15px;color:#a8b3c0}.agenda-empty{text-align:center;padding:45px 0}.agenda-empty b{display:block;font-size:15px}.agenda-empty p{font-size:12px;color:#98a6b5}
.event-templates{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:15px}.event-templates[hidden]{display:none}
.event-templates>span{font-size:9px;font-weight:850;letter-spacing:.07em;color:#96a3b3;margin-right:3px}
.event-templates>button{background:#f7f9fe;border:1px solid #e0e7f2;border-radius:999px;padding:7px 10px;font-size:10px;font-weight:750;color:#576b8b}
.event-templates>button:hover{background:#e8f0ff;color:#325bc4}
.v4-calendar .view-switch{flex-wrap:nowrap}.calendar-card .day-cell[data-open-day]{cursor:pointer}
@media(max-width:1250px){.home-page.v4-home{padding:23px 20px}.home-workspace{grid-template-columns:minmax(0,1.3fr) minmax(288px,.9fr)}.v4-panel{padding:16px}.home-side-stack{gap:12px}}
@media(max-width:990px){.home-workspace{grid-template-columns:1fr}.home-side-stack{grid-template-columns:1fr 1fr;grid-template-rows:auto}.home-command h1{font-size:29px}}
@media(max-width:760px){.topbar{height:54px;padding:0 14px}.home-page.v4-home{padding:18px 13px calc(104px + env(safe-area-inset-bottom))}.home-command{margin-bottom:12px}.home-command h1{font-size:26px;margin:4px 0}.home-command p{font-size:11px}.home-command .eyebrow{font-size:9px}.command-actions{gap:5px}.command-actions .btn{min-height:35px;padding:8px 10px;font-size:11px}.home-utility{margin-bottom:11px}.synced-note{display:none}.week-peek{padding:12px 11px;margin-bottom:11px}.week-peek-grid{gap:4px}.peek-day{padding:9px 2px;min-height:83px;border-radius:8px}.peek-day strong{font-size:20px}.peek-day small{font-size:9px}.home-workspace{grid-template-columns:1fr;gap:11px}.home-side-stack{grid-template-columns:1fr 1fr;gap:11px}.v4-panel{padding:14px;border-radius:13px}.home-agenda{min-height:0}.v4-upcoming{display:grid;grid-template-columns:1fr}.v4-upcoming-item:nth-child(n+4){display:none}.calendar-intro h1{font-size:24px}.v4-calendar{padding:16px 12px calc(102px + env(safe-area-inset-bottom))}.calendar-utils{flex-direction:column;align-items:stretch;gap:8px}.calendar-utils .family-filters{max-width:100%}.calendar-utils .cal-search{width:100%}.calendar-card:has(.agenda-range){padding:6px 13px}.v4-calendar .calendar-content{display:block}.v4-calendar .bottom-panel{margin-top:14px}.calendar-intro .btn{padding:8px 10px;font-size:11px}.calendar-toolbar{flex-wrap:wrap;gap:8px}.calendar-toolbar .cal-controls{width:100%;justify-content:space-between}.v4-calendar .calendar-toolbar h2{font-size:17px}.v4-calendar .view-switch button{padding:7px 10px}}
@media(max-width:540px){.home-command{align-items:start}.home-command h1{font-size:23px;line-height:1.12}.home-command p{display:none}.command-actions .btn.light{display:none}.peek-day strong{font-size:18px}.peek-day small{font-size:8px}.home-side-stack{grid-template-columns:1fr}.home-side-stack .v4-panel{min-height:0}.home-side-stack .v4-panel .home-list{max-height:180px;overflow:auto}.v4-home .overview-event-time{min-width:58px}.v4-panel-heading h2{font-size:16px}.agenda-date-events{margin-left:0}.agenda-range-time{min-width:47px}.calendar-intro h1{font-size:21px}.calendar-intro .eyebrow{font-size:9px}.calendar-intro .btn{min-height:35px}}
@media(max-width:365px){.peek-day small{display:none}.peek-day{min-height:68px}.peek-day strong{font-size:17px}.home-command h1{font-size:21px}.family-chip{padding:7px 10px}}

/* v4.1: no forced empty-space stretch; better empty states and mobile agenda. */
.home-workspace{align-items:start}
.home-agenda{min-height:0}
.home-side-stack{display:flex;flex-direction:column;align-items:stretch}
.home-side-stack>.v4-panel{min-height:0}
.v4-empty{padding:17px 8px 20px}
.empty-quick-actions{display:flex;gap:7px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:7px}
.empty-quick-actions button{border:1px solid #dce7fb;background:#f4f7ff;color:#285aca;font-weight:730;border-radius:999px;padding:7px 10px;font-size:10px}
.empty-quick-actions button:focus-visible,.agenda-free-day:focus-visible{outline:2px solid #3567db;outline-offset:2px}
.agenda-free-day{border:1px dashed #e4eaf3;background:#f9fbfe;width:calc(100% - 8px);margin:4px 4px 8px;border-radius:10px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;text-align:left;font-size:11px;color:#8a99ae}
.agenda-free-day>span{display:inline-flex;align-items:center;gap:4px;color:#2862df;font-weight:750}
.agenda-free-day svg{width:13px;height:13px}
.live-dot.is-offline{background:#e6a23c!important}
@media(max-width:990px){.home-side-stack{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto}}
@media(max-width:540px){.home-side-stack{display:flex;flex-direction:column}.agenda-free-day{padding:11px}}
