.family-calendar { max-width: 90rem; margin: auto; padding: clamp(1.25rem,4vw,4rem); color: #352932; }
.calendar-heading h1 { margin: 0; font: 700 clamp(2.1rem,4.2vw,3.8rem)/1.07 var(--font-display); letter-spacing: -.045em; }
.calendar-heading p { color: #505d54; margin: .8rem 0 1.8rem; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(16rem,1fr); align-items: start; gap: 1.25rem; }
.month-sheet, .calendar-agenda { min-width: 0; border: 1px solid #ded5c7; border-radius: 1.15rem; overflow: hidden; background: #fffcf7; }
.month-toolbar, .calendar-agenda header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: 1.1rem 1.3rem; }
.month-toolbar h2, .calendar-agenda h2 { font: 700 clamp(1.25rem,2.4vw,2rem)/1.1 var(--font-display); margin: 0; }
.month-toolbar nav { display: flex; gap: .3rem; }
.month-toolbar a { min-height: 2.6rem; min-width: 2.6rem; display: inline-grid; place-items: center; background: #fffcf7; border: 1px solid #d6ccbd; border-radius: .6rem; text-decoration: none; color: #394b42; }
.month-step { font-size: 1.55rem; line-height: 1; }
.month-today { padding-inline: .75rem; font-weight: 650; }
.month-toolbar a:hover, .month-day:hover { background: #f0f3ea; }
.month-grid { width: 100%; table-layout: fixed; border-collapse: collapse; }
.month-grid th { padding: .6rem 0; font-size: .82rem; font-weight: 650; color: #45554a; background: #edf0e6; }
.month-grid td { padding: 0; vertical-align: top; border-top: 1px solid #e6dfd3; }
.month-grid td + td { border-left: 1px solid #e6dfd3; }
.month-grid td:nth-last-child(-n+2) { background: #faf6ef; }
.month-day, .outside-month > span { display: block; min-height: clamp(5.5rem,8vw,7.4rem); padding: .4rem; color: inherit; text-decoration: none; }
.day-number, .outside-month > span { font-size: .94rem; font-weight: 620; }
.outside-month { background: #f7f4ed; color: #867d72; }
.day-number { display: inline-grid; place-items: center; min-width: 1.85rem; height: 1.85rem; border-radius: 50%; }
.month-day[aria-current="date"] .day-number { background: #ad4b3b; color: white; }
.month-day.chosen-day { background: #edf3ea; box-shadow: inset 0 0 0 2px #627e62; }
.month-day:focus-visible { outline-offset: -3px; }
.day-event { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #e4eddd; color: #294d3f; margin-top: .18rem; padding: .15rem .28rem; border-radius: .25rem; font-size: .74rem; }
.day-more { color: #48604a; font-size: .7rem; }
.day-count { display: none; }
.calendar-agenda { padding: 1.2rem; }
.calendar-agenda header { padding: 0 0 .85rem; border-bottom: 1px solid #e4dccf; flex-wrap: wrap; }
.calendar-agenda h2 { font-size: 1.45rem; }
.calendar-agenda header a { font-size: .88rem; }
.agenda-event { display: grid; grid-template-columns: 2.9rem minmax(0,1fr); gap: .7rem; padding: .95rem 0; }
.agenda-event + .agenda-event { border-top: 1px solid #e4dccf; }
.agenda-event h3 { margin: .24rem 0; font: 700 1.07rem/1.26 var(--font-display); }
.agenda-event h3 a { color: inherit; text-decoration-thickness: 1px; }
.agenda-event p { margin: 0; color: #5b625b; font-size: .86rem; }
.agenda-event .agenda-time { color: #764034; font-weight: 650; }
.agenda-date { align-self: start; display: grid; place-items: center; padding: .4rem .1rem; border-radius: .5rem; background: #f6e5dc; color: #763b2d; }
.agenda-date strong { font-size: 1.3rem; line-height: 1.05; }
.agenda-date span { font-size: .74rem; }
.agenda-empty { color: #556257; }
@media (min-width: 851px) { .calendar-agenda { scroll-margin-top: 16rem; } }
@media (max-width: 850px) { .calendar-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 600px) {
  .family-calendar { padding: 1.4rem .75rem; }
  .month-toolbar { padding: .8rem; }
  .month-day, .outside-month > span { min-height: 3.6rem; padding: .16rem; }
  .day-event, .day-more { display: none; }
  .day-count { display: block; width: fit-content; margin: 0 auto; padding: 0 .3rem; background: #ddeada; border-radius: .35rem; color: #294d3f; font-size: .7rem; }
  .month-grid td { text-align: center; }
}
