.project-rail,.near-day,.inline-mood,.week-task{min-width:0}
.project-rail{display:flex;gap:7px;overflow-x:auto;padding:3px 1px 8px;scroll-snap-type:x proximity}
.project-rail button,.home-medal{display:inline-flex;align-items:center;gap:7px;border-radius:16px;min-height:44px;white-space:nowrap}
.project-rail button{flex:none;scroll-snap-align:start}
.project-rail [aria-pressed=true],.task-start,.home-medal{background:var(--soft);color:var(--accent-strong)}
.project-rail svg,.home-medal svg{width:19px;height:19px}
.near-day{margin-block:14px}.near-day h2{font-size:1.02rem}.near-day h2 small,.home-medal b{padding:2px 8px;border-radius:99px;background:var(--soft);color:var(--accent-strong)}
.near-day .task-card{margin-block:6px}.task-card .task-start{padding:5px 12px;border:1px solid var(--border);border-radius:12px}
.quick-undo{position:fixed;z-index:190;bottom:calc(80px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:6px;padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:0 4px 18px #0002}.quick-undo button{min-height:40px;border-radius:16px}
[data-page=plan]>.main>.nyvi-section-heading h1,[data-page=wellness]>.main>.nyvi-section-heading,[data-page=profile]>.main>.nyvi-section-heading,.schedule-mode-week .calendar-filter-icons{display:none!important}
.inline-mood{display:flex;gap:6px;margin:10px 0}.inline-mood button{flex:1;min-width:0;background:var(--soft);color:var(--accent-strong);border-radius:16px;padding:7px}.inline-mood svg{width:100%;max-width:44px;height:auto}
.schedule-calendar .calendar-task-count{display:inline-flex;align-self:center;justify-content:center;align-items:center;border-radius:14px;min-height:44px;height:auto;gap:6px;padding:8px}.calendar-task-count:after{content:'›';font-size:1.4em}.calendar-highlights .calendar-task-count strong{font-size:1rem}
.schedule-calendar .calendar-forecast:not(:has(.cycle-summary-owner)){background:transparent;border:0;box-shadow:none;padding:0!important}
.schedule-calendar .schedule-toolbar{justify-content:flex-end}.schedule-calendar>.schedule-date-heading{margin:8px 0 0}.schedule-date-heading h2{margin:0}
.calm-shell .schedule-mode-month .calendar-day{min-height:54px;height:auto}.calm-shell .schedule-mode-month .calendar{grid-auto-rows:auto}.calm-shell .schedule-mode-month .day-number{min-height:48px;justify-content:flex-start}.marker-key{font-size:.8rem;color:var(--muted)}
.calm-shell .schedule-mode-month .dual-date .day-numeral{border-radius:4px;background:white!important;color:#141414!important;height:auto;width:90%;min-height:18px;border:0;box-shadow:none}.dual-date .day-numeral svg{display:none}.dual-date .pair-phase{display:block;width:94%;border-radius:4px;background:#eee9eb;color:#352c36;font:600 10px/14px system-ui;white-space:nowrap}.dual-date .period,.dual-date .estimated{background:#ffd8df}.dual-date .central{background:#d6eabc}.dual-date .possible{background:#fff2ab}.dual-date .outside{background:#cfeefa}.dual-date .estimated{outline:1px dashed #ab4968;outline-offset:-1px}
.nyvi-week-scroll .week-task{display:flex;flex-direction:row;align-items:flex-start;gap:2px}.week-task button:first-child{background:var(--surface);color:var(--accent-strong);padding:0;min-width:24px;min-height:26px;border-radius:6px}.week-task .agenda-task-edit{padding:1px!important;min-width:0;flex:1;align-self:stretch;border:0;background:transparent}
.profile-medals[open]{border-color:var(--accent-strong)}.home-medal{justify-self:start;border:1px solid var(--border);padding:6px 13px}
.organizer-controls input[type=search],.shop-search-order input[type=search],.tool-library input[type=search]{min-height:44px;border-radius:14px;background:var(--surface);border:1px solid var(--border)}

.simple-date-filter button[title] span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.shared-filter>summary{min-height:44px;display:flex;align-items:center;gap:8px;color:var(--accent-strong);font-weight:650}
.quick-search,.general-tools>.tool-search{display:block;margin-block:8px}.quick-search input,.general-tools>.tool-search input{width:100%;min-height:44px;border-radius:14px}

.schedule-calendar:has(.dual-date) .month-color-key li span::before{display:inline-grid;place-content:center;font:9px/1 system-ui}
.schedule-calendar:has(.dual-date) .month-color-key li:nth-child(1) span::before{content:'●'}
.schedule-calendar:has(.dual-date) .month-color-key li:nth-child(2) span::before{content:'◐'}
.schedule-calendar:has(.dual-date) .month-color-key li:nth-child(3) span::before{content:'✦'}
.schedule-calendar:has(.dual-date) .month-color-key li:nth-child(4) span::before{content:'○'}
.schedule-calendar:has(.dual-date) .month-color-key li:nth-child(5) span::before{content:'–'}
.schedule-calendar:has(.dual-date) .month-color-key li:nth-child(6) span::before{content:'◌'}

.organizer-hub>.organizer-toolbar-panel{margin:0 0 6px;padding:0;min-width:0}
.organizer-toolbar-panel>summary{display:flex;align-items:center;gap:7px;width:fit-content;min-height:44px;padding:0 12px;color:var(--accent-strong);cursor:pointer;font-weight:650;list-style:none;border:1px solid var(--border);border-radius:14px}
.organizer-toolbar-panel>summary::-webkit-details-marker{display:none}
.organizer-toolbar-panel>summary svg{width:17px;height:17px}
.organizer-toolbar-panel>summary:after{content:"⌄";margin-inline-start:4px}.organizer-toolbar-panel[open]>summary:after{transform:rotate(180deg)}
.organizer-toolbar-panel-body{display:grid;gap:8px;padding:10px 0;min-width:0}

.home-extra-care{margin-block:8px;color:var(--ink)}.home-extra-care summary{width:fit-content;cursor:pointer;color:var(--accent-strong);padding:10px 4px;font-weight:650}.home-extra-care svg{width:18px;height:18px;vertical-align:middle;margin-inline:4px}.home-extra-care>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:6px}.home-extra-care button{display:flex;align-items:center;gap:4px;text-align:start;min-height:44px;min-width:0}

.calm-shell .mobile-nav.nyvi-main-destinations,.unified-navigation .mobile-nav.nyvi-main-destinations,.mobile-nav.nyvi-main-destinations{grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);grid-template-columns:none}
.well-history-filters{display:flex;flex-wrap:wrap;gap:.65rem;margin-block:1rem}.well-history-filters label{flex:1 1 9rem;min-width:0}.well-history-filters select{width:100%;min-height:44px}.care-history-link,.home-extra-care>a{display:inline-flex;align-items:center;min-height:44px;font-weight:650}


/* The phone follows a single reading order. The two desktop columns keep
   independent heights so an expanded form never pushes plans off screen. */
.home-daily-column,.home-planning-column{display:grid;align-content:start;gap:var(--section-gap,12px);min-width:0}
.nyvi-home-feed :is(.home-daily-column,.home-planning-column)>:empty,.home-planning-column:empty,.quick-reminder-status:empty{display:none}
.calm-shell :is(.organize-sections,.profile-sections,.family-tabs)>button{min-height:44px;line-height:1.13}
.calm-shell .schedule-calendar .schedule-toolbar:has(#calendar-cycle-owner){display:flex;align-items:end;justify-content:space-between;gap:10px}
.schedule-toolbar label:has(#calendar-cycle-owner){display:grid;min-width:0;flex:1;max-width:22rem;font-size:.8rem}
.schedule-toolbar #calendar-cycle-owner{width:100%;min-height:44px}
.schedule-date-heading>.calendar-capture{margin-inline-start:auto}
.calm-shell .calendar-highlights{align-items:center}
.calm-shell .calendar-highlights .calendar-forecast{height:auto}
.calm-shell .shop-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.calm-shell .shop-filters>:is(.life-tabs,.quick-search,details){margin:0;min-width:0}
.shop-filters .shop-search-details>summary{min-height:44px;list-style:none;display:flex;align-items:center;gap:8px}
.shop-search-details>summary::after{content:'⌄';margin-inline-start:auto}.shop-search-details[open]>summary::after{transform:rotate(180deg)}
.shop-search-details summary svg{width:18px;height:18px;flex:none}
.calm-shell .shop-summary{gap:10px;margin:6px 0 0}.calm-shell .shop-summary>div{padding:5px 0;background:transparent;border:0;gap:2px}
.calm-shell .shop-summary>div+div{padding-inline-start:12px;border-inline-start:1px solid var(--border);border-radius:0}
.profile-collections{display:grid;align-items:start;gap:12px}.profile-collections>*{margin:0;min-width:0}
.settings-support{margin-block:12px}.settings-support summary{min-height:44px;align-content:center}.settings-support .simple-settings{margin-block:8px}
@media(max-width:760px){
 .calm-shell :is(.organize-sections,.profile-sections,.family-tabs)>button{flex-direction:row;gap:4px;padding:5px 3px}
 .calm-shell .family-tabs>button svg{width:16px;flex:none}
 .calm-shell :is(.general-tool-niches,.growth-tabs){display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;max-width:100%;min-width:0;padding-block:3px;scroll-padding-inline:6px}
 .calm-shell :is(.general-tool-niches,.growth-tabs)>button{flex:0 0 auto;min-height:44px;white-space:nowrap}
 .calm-shell .shop-filters{padding:10px 12px}
 .calm-shell .profile-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-block:10px}
 .calm-shell .profile-stats article{display:flex;align-items:center;gap:7px;padding:8px 10px;min-height:44px}
 .calm-shell .profile-stats article strong{font-size:1.15rem}
 .calm-shell .profile-stats article span{font-size:.79rem;line-height:1.15}
 .calm-shell .schedule-calendar>.calendar-highlights{margin-block:5px}
 .calm-shell .stats-surface .stats-filters{margin-block:0 8px}
}
@media(min-width:1000px){
 .nyvi-home-feed:has(.home-planning-column:not(:empty)){grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);align-items:start;gap:20px}
 .profile-collections{grid-template-columns:repeat(2,minmax(0,1fr))}
 .organizer-hub:has(>.near-day){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px}
 .organizer-hub:has(>.near-day)>:not(.near-day){grid-column:1/-1}
 .calm-shell .shop-filters{grid-template-columns:auto minmax(12rem,1fr);align-items:center}
 .shop-filters>.shop-search-details{grid-column:1/-1}
 .calm-shell #view-content:has(>.simple-settings),.calm-shell #view-content:has(.personal-appearance),.calm-shell #view-content:has(#care-routines){max-width:62rem;margin-inline:auto}
}

.shop-filters .shop-search-details>summary::before{content:none}
#family-panel .family-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}
#family-panel .family-switch button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:44px;line-height:1.2}
#family-panel .family-switch .ui-icon{width:18px;height:18px}
#family-panel .family-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.7fr) auto;gap:7px;align-items:center}
#family-panel .family-toolbar>*{min-width:0;width:100%}
@media(max-width:560px){
 #family-panel .family-switch button{flex-direction:column;font-size:.8rem;padding:6px 3px}
 #family-panel .family-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,.85fr)}
 #family-panel .family-toolbar [data-family-search]{grid-column:1/-1}
}


/* A fifth central action on mobile. The route indicator still follows only destinations. */
.mobile-nav.nyvi-main-destinations:has([data-menu-add]){grid-template-columns:repeat(5,minmax(0,1fr))}
.mobile-nav.nyvi-main-destinations:has([data-menu-add]):not(:has([data-view=calendar]))>[data-view=home]{grid-column:span 2}
.mobile-nav.nyvi-main-destinations>[data-menu-add]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;min-height:46px;padding:0 2px;border:0;background:transparent;text-decoration:none;color:var(--accent-strong);font-weight:700}
.mobile-nav .nyvi-add-entry .nyvi-add-disc{display:grid;place-items:center;width:37px;height:37px;border-radius:15px;background:var(--accent-strong,var(--accent));color:var(--surface);box-shadow:0 3px 9px color-mix(in srgb,var(--accent) 26%,transparent);transition:transform .18s ease}
.mobile-nav .nyvi-add-entry .nyvi-add-disc svg{width:23px;height:23px;fill:none;stroke:currentColor}
.mobile-nav .nyvi-add-entry:active .nyvi-add-disc{transform:scale(.91)}
.mobile-nav .nyvi-add-entry[aria-expanded=true] .nyvi-add-disc{transform:rotate(45deg)}
.nyvi-entry-sheet{position:fixed;inset:auto 0 0;width:min(100%,34rem);max-width:100%;box-sizing:border-box;max-height:85dvh;margin:0 auto;padding:0 16px max(20px,env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;border:1px solid var(--border);border-radius:24px 24px 0 0;background:var(--surface);color:var(--text,var(--ink));box-shadow:0 -10px 45px #24152625}
.nyvi-entry-sheet[open]{animation:nyvi-entry-rise .2s ease-out}.nyvi-entry-sheet::backdrop{background:#20132365}
.nyvi-entry-sheet header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 0 8px;background:var(--surface);border-bottom:1px solid var(--border)}
.nyvi-entry-sheet header h2{margin:0;font-size:1.23rem}.nyvi-entry-sheet header button{display:grid;place-items:center;padding:0;width:44px;height:44px;border-radius:50%;font-size:1.35rem}
.nyvi-entry-sheet section h3{margin:16px 0 8px;font-size:.91rem;color:var(--accent-strong)}
.nyvi-entry-sheet section>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.nyvi-entry-sheet [data-entry-key]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:64px;padding:7px 3px;background:var(--surface-2,var(--surface));border:1px solid var(--border);border-radius:13px;font-size:.8rem;line-height:1.17;text-align:center;color:inherit;overflow-wrap:anywhere}
.nyvi-entry-sheet [data-entry-key] svg{width:20px;height:20px;color:var(--accent-strong)}
.nyvi-entry-sheet button:focus-visible,.mobile-nav [data-menu-add]:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}
@keyframes nyvi-entry-rise{from{transform:translateY(16px);opacity:.5}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.nyvi-entry-sheet[open]{animation:none}.mobile-nav .nyvi-add-entry .nyvi-add-disc{transition:none}}
