/* The summary should leave the actual timeline visible. A past incomplete
   plan has a neutral state, never a checkmark or a large empty feature card. */
.calendar-momentum.calendar-plan-deck{padding:16px;border-radius:22px;margin-bottom:16px}
.calendar-plan-deck .calendar-momentum-top{padding:0 0 10px}
.calendar-plan-deck .calendar-plan-feature{gap:12px;padding:16px;border-radius:16px}
.calendar-plan-deck .calendar-plan-feature .calendar-plan-name{font-size:20px;line-height:1.35;max-width:none;letter-spacing:-.3px}
.calendar-plan-deck .calendar-plan-feature .calendar-plan-feature-bottom{min-height:32px}
.calendar-plan-deck .calendar-plan-feature .calendar-plan-arrow{width:32px;height:32px}
.calendar-plan-deck .calendar-plan-complete{display:flex;align-items:center;gap:10px;padding:10px 0;background:transparent;border-radius:0;font-size:13px;line-height:1.5;color:var(--muted)}
.calendar-plan-complete>svg{flex:none}
.calendar-plan-complete.is-finished{color:var(--success)}
.calendar-plan-deck>.progress-track{margin:12px 0 0;height:5px}

/* Shared column sizes for events, gaps and resize handles. No added grid
   gaps: the duration handles use the same time/track origin as the capsule. */
.day-agenda:not(.flexible-day){--time-width:max(42px,3.8ch);--track-width:48px;padding:18px 12px!important}
.day-agenda:not(.flexible-day)>.agenda-event,.day-agenda:not(.flexible-day)>.agenda-gap{column-gap:0}
.day-agenda:not(.flexible-day)>.agenda-event .agenda-icon{width:44px;min-width:44px;border:0!important}
.day-agenda:not(.flexible-day) .agenda-content{padding:16px 10px}
.day-agenda:not(.flexible-day) :is(.agenda-content,.agenda-duration,.agenda-progress,.agenda-gap-body){overflow-wrap:anywhere}
.day-agenda:not(.flexible-day) .agenda-completed-label{flex-wrap:wrap;overflow-wrap:anywhere}
.day-agenda:not(.flexible-day) .agenda-title h3{font-size:16px;line-height:1.5;overflow-wrap:break-word}
.day-agenda:not(.flexible-day) .agenda-gap{padding:0;min-height:92px}
.day-agenda:not(.flexible-day) .agenda-gap-body{padding:12px 10px!important}
.day-agenda:not(.flexible-day) .agenda-boundary{gap:6px}
@container calendar-day (max-width:28em){
 .day-agenda:not(.flexible-day)>.agenda-event{grid-template-columns:var(--time-width) var(--track-width) minmax(0,1fr);grid-template-rows:1fr auto}
 .day-agenda:not(.flexible-day)>.agenda-event>.agenda-time,.day-agenda:not(.flexible-day)>.agenda-event>.agenda-track{grid-row:1 / span 2}
 .day-agenda:not(.flexible-day)>.agenda-event>.agenda-content{grid-column:3;grid-row:1;padding-bottom:0}
 .day-agenda:not(.flexible-day)>.agenda-event>.agenda-action{grid-column:3;grid-row:2;justify-self:end;margin:0 0 12px;height:44px;min-height:44px}
 .day-agenda:not(.flexible-day)>.agenda-event.is-routine>.agenda-content{grid-row:1 / span 2;padding-bottom:16px}
 .day-agenda:not(.flexible-day)>.agenda-event>.agenda-routine-mark{display:none}
}

/* Seven aligned columns. Keep real start/end mapping and collision groups;
   the narrower strip shows icons, while the selected-day list gives details. */
#app[data-view=calendar] .calendar-week-board{--hour-height:80px;border:0;border-radius:22px;overflow:clip}
.calendar-week-controls .week-aligned-date-header{padding:0 4px 0 0}
.calendar-navigation.is-week .habit-week-strip{background:transparent;border:0;border-radius:0;padding:0}
.calendar-navigation.is-week .habit-week-strip .week{gap:4px;padding:0}
.calendar-navigation.is-week .habit-week-strip .day{padding:8px 0;min-height:58px;border-radius:14px}
.calendar-navigation.is-week .habit-week-strip .dots{display:none}
.calendar-week-board .week-canvas{padding-right:4px;margin-top:14px}
.calendar-week-board .week-track{border-radius:12px}
.calendar-week-board .week-track.is-selected{box-shadow:none;background:var(--accent-wash)}
.calendar-week-board .week-capsule{border:0;border-radius:12px;gap:4px}
.calendar-week-board .week-capsule.is-routine{background:var(--surface-3);border:0}
.calendar-week-board .week-group-shortcut{border:0;box-shadow:none;border-radius:10px}
.calendar-week-board .week-board-heading{padding:14px 12px 0}
.calendar-week-board .week-board-note{padding:14px 12px;font-size:11px}
.week-selected-plan>summary{min-height:60px;padding:12px 14px}
@media(max-width:560px){.week-capsule[data-show-time=true]>.week-capsule-time{display:none}.week-capsule>.week-event-icon,.week-capsule>.week-event-icon>svg{width:20px;height:20px}}

/* A complete question, illustration and five answers fit a normal phone.
   Larger system text remains scrollable instead of being shrunk or clipped. */
#modal .onboarding-sheet:has(.intro-question) .sheet-content{display:flex;flex-direction:column;padding:8px 20px 12px}
#modal .onboarding-sheet:has(.intro-question) .sheet-header{min-height:44px;height:auto;padding:0 16px}
#modal .onboarding-sheet .sheet-header h2[tabindex="-1"]:focus-visible{outline:none}
#modal .onboarding-sheet:has(.intro-question) .onboarding{flex:1;display:flex;flex-direction:column;min-height:0}
.intro-question{display:flex;flex-direction:column;gap:10px;width:100%;max-width:430px;align-self:center;flex:1}
.intro-question-top{display:flex;align-items:center;gap:14px}
.intro-question-top .onboarding-eyebrow{font-size:11px;white-space:nowrap}
.intro-question-progress{flex:1;margin:0;gap:5px}
.intro-question-progress span{height:3px}
.intro-question-art{display:block;flex:1 0 auto;min-height:120px;max-height:220px;height:clamp(120px,calc(var(--page-viewport-height,100dvh) - 480px),220px);width:auto;max-width:100%;align-self:center;margin:0;object-fit:contain;border:0;border-radius:0;background:transparent;box-shadow:none}
.intro-question-heading{display:grid;gap:7px}
.intro-question .onboarding-title{font-size:22px;line-height:1.25;letter-spacing:-.35px}
.intro-question .onboarding-copy{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.intro-answer-options{display:grid;gap:7px;margin:2px 0 0}
.intro-answer-options label>span{min-height:44px;padding:10px 14px;border-radius:14px;gap:12px;transition:background .16s,color .16s}
.intro-answer-copy strong{font-size:13px;line-height:1.4;font-weight:550}
.intro-answer-check{width:20px;height:20px;display:grid;place-items:center;border-radius:50%;background:var(--surface-3);opacity:1}
.intro-answer-check>svg{width:13px;height:13px;opacity:0}
.intro-answer-options input:checked+span{background:var(--accent);color:var(--accent-contrast)}
.intro-answer-options input:checked+span .intro-answer-check{background:var(--accent-contrast);color:var(--accent)}
.intro-answer-options input:checked+span .intro-answer-check>svg{opacity:1}
#modal .onboarding-sheet:has(.intro-question) .sheet-footer{padding:6px 20px 8px}
@media(max-height:680px){
 .intro-question{gap:7px}.intro-question .onboarding-title{font-size:20px}.intro-question .onboarding-copy{font-size:10px}
 .intro-answer-options{gap:5px}.intro-answer-options label>span{padding:9px 12px}
}
@media(prefers-reduced-motion:reduce){.intro-answer-options label>span{transition:none}}
