
#calendar .calendar-layout{grid-template-columns:minmax(0,2.6fr) minmax(240px,1fr);gap:20px}
#calendar .cal-top{gap:12px;flex-wrap:wrap;padding:18px 20px 8px}#calendar .calMonth{font-size:15px}
.cal-view-switch{display:flex;gap:4px;margin:4px 20px 12px;background:#f4f0f3;padding:4px;border-radius:10px;width:fit-content}
.cal-view-switch button{border:0;background:transparent;border-radius:7px;padding:6px 17px;font-size:13px;color:#80717b}.cal-view-switch button[aria-pressed="true"]{background:#a61934;color:#fff;box-shadow:0 3px 9px #a6193420}
#calendar .weekdays{gap:0;padding:0 16px;margin:0}#calendar .weekdays[hidden]{display:none}
#calGrid.calendar-agenda{display:block;padding:0 16px 18px;gap:0}
.calendar-week{position:relative;min-height:calc(34px + var(--calendar-lanes)*var(--calendar-row) + 10px);border-bottom:1px solid #e9eaf0;border-left:1px solid #e9eaf0}
.calendar-week-days{position:absolute;inset:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.calendar-cell{border:0;border-right:1px solid #e9eaf0;border-radius:0;background:#fff;text-align:left;align-content:start;padding:7px 8px;font-size:12px;color:#596477;cursor:pointer;display:flex;align-items:flex-start}
.calendar-cell.muted{color:#b7bfca;background:#fafbfd}.calendar-cell.today>span{background:#b5162b;color:#fff;border-radius:50%;width:22px;height:22px;display:grid;place-items:center}.calendar-cell.selected{background:#fff1f4}.calendar-cell:hover{background:#fff5f7}
.calendar-week-events{position:relative;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:var(--calendar-row);padding-top:34px;pointer-events:none}
.calendar-event-bar{pointer-events:auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:1px 2px;padding:2px 6px;border:0;border-left:3px solid var(--event-color);border-radius:4px;background:var(--event-bg);color:var(--event-color);font-size:11px;line-height:1.4;text-align:left;cursor:pointer}
.calendar-event-bar.continues-before{border-left:0;border-radius:0 4px 4px 0;margin-left:0}.calendar-event-bar.continues-after{border-radius:4px 0 0 4px;margin-right:0}.calendar-event-bar.continues-before.continues-after{border-radius:0}.calendar-event-bar:hover{filter:brightness(.96)}
#calGrid.view-week .calendar-week{min-height:max(220px,calc(40px + var(--calendar-lanes)*25px))}
#calGrid.view-year{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.calendar-mini-month{min-width:0;border:1px solid #ececf2;border-radius:10px;padding:8px;overflow:hidden}.calendar-mini-title{border:0;background:transparent;font-size:14px;font-weight:700;color:#99243d;padding:3px 0 8px}.calendar-mini-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center;font-size:9px;color:#9a9ead}.calendar-mini-month .calendar-cell{font-size:9px;padding:3px}.calendar-mini-month .calendar-week{min-height:calc(19px + var(--calendar-lanes)*14px + 4px)}.calendar-mini-month .calendar-week-events{padding-top:19px}.calendar-mini-month .calendar-event-bar{font-size:8px;margin:1px 0;padding:0 2px;border-left-width:2px}.calendar-mini-month .calendar-cell.today>span{width:14px;height:14px}.calendar-mini-more{border:0;background:transparent;color:#8792a3;font-size:10px;padding:6px 0 0}
@media(max-width:1000px){#calendar .calendar-layout{grid-template-columns:1fr}#calGrid.view-year{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){#calendar .cal-top{padding:14px 12px 8px}#calGrid.calendar-agenda{padding:0 8px 12px}#calendar .weekdays{padding:0 8px}.cal-view-switch{margin-left:12px}.calendar-cell{padding:6px 3px;font-size:11px}.calendar-event-bar{font-size:9px;padding:3px;line-height:1.5}.calendar-week-events{padding-top:31px}#calGrid.view-year{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.calendar-mini-month{padding:5px}.calendar-mini-month .calendar-week-events{padding-top:19px}}

/* Cheerful calendar and a dedicated full activity page. */
#calendar .calendar-box,#calendarArchive .calendar-box{border:1px solid #eeebf1;border-radius:24px;background:linear-gradient(145deg,#fff,#fff9fb);box-shadow:0 15px 50px #a34a6810}
#calendar .cal-top,#calendarArchive .cal-top{padding:22px 22px 10px}
#calendar .calendar-date-selectors select,#calendarArchive .calendar-date-selectors select,#calendar .calendar-year-picker>button,#calendarArchive .calendar-year-picker>button{border:1px solid #eed8df;border-radius:13px;background:#fff;color:#a51632;font-weight:700;padding:8px 13px}
#calendar .cal-controls .icon-btn,#calendarArchive .cal-controls .icon-btn{border-color:#e9e7ef;background:#fff;border-radius:12px;color:#738092}
#calendar .cal-controls .icon-btn:hover,#calendarArchive .cal-controls .icon-btn:hover{background:#fff0f5;color:#b51636}
.cal-view-switch{background:#faf0f5;border:1px solid #f3e4ec}.cal-view-switch button[hidden]{display:none}
.calendar-week{border-left:0;border-bottom:1px solid #f3edf2;min-height:calc(66px + var(--calendar-lanes)*var(--calendar-row))}
.calendar-cell{position:relative;border-right:0;margin:3px;border-radius:13px;padding:11px 9px;background:transparent;color:#5d6273;font-size:14px;transition:background .18s,color .18s}
.calendar-cell.muted{background:transparent;color:#c7cbd4}.calendar-cell.selected,.calendar-cell:hover,.calendar-cell:focus-visible{background:#fff0f5;color:#af1b39}
.calendar-cell::after{content:'+';position:absolute;right:7px;top:8px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#bd1738;color:#fff;font:400 23px/1 system-ui,sans-serif;opacity:0;transform:scale(.8);transition:opacity .16s,transform .16s;pointer-events:none}
.calendar-cell:hover::after,.calendar-cell:focus-visible::after{opacity:1;transform:scale(1)}
.calendar-cell.today{box-shadow:inset 0 0 0 1px #efb3c3}.calendar-cell.today>span{background:transparent;color:#b51636;font-weight:700}
.calendar-week-events{padding-top:42px}.calendar-event-bar{box-shadow:0 1px 2px #47556908}
.calendar-mini-month .calendar-week{min-height:calc(19px + var(--calendar-lanes)*14px + 4px)}.calendar-mini-month .calendar-cell{margin:0;border-radius:3px;padding:3px;font-size:9px}.calendar-mini-month .calendar-cell::after{display:none}.calendar-mini-month .calendar-week-events{padding-top:19px}
#calendarArchive .calendar-layout{display:block}#calendarArchive .calendar-side{display:none}#calendarArchive .calendar-box{max-width:none}#calendarArchive .weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));padding:0 16px;margin:0}#calendarArchive .weekdays[hidden]{display:none}
#calendarArchiveDetails{margin-top:32px}.calendar-details-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}.calendar-details-heading h2{font-size:25px;margin:0}.calendar-details-heading>span{color:#a8667b;background:#fff0f5;padding:5px 12px;border-radius:20px;font-size:14px}
.calendar-detail-card{border:1px solid #eee5ec;background:#fff;border-radius:15px;padding:19px 22px;margin:10px 0;box-shadow:0 5px 18px #54304b04}.calendar-detail-date{font-size:13px;color:#b03957;margin-bottom:5px}.calendar-detail-card h3{font-size:19px;line-height:1.5;margin:0 0 7px;color:#433a49}.calendar-detail-card p{font-size:15px;color:#808395;margin:4px 0;line-height:1.7}.calendar-detail-text{white-space:pre-wrap}
@media(max-width:600px){#calendar .cal-top,#calendarArchive .cal-top{padding:15px 12px 8px}.calendar-cell{margin:1px;padding:9px 4px;font-size:12px}.calendar-cell::after{width:18px;height:18px;right:3px;top:9px;font-size:17px}.calendar-week{min-height:calc(60px + var(--calendar-lanes)*var(--calendar-row))}.calendar-details-heading h2{font-size:21px}.calendar-detail-card{padding:15px}}

/* Fit the homepage calendar and its five recent activities within one viewport. */
#home #calendar .calendar-layout{height:var(--home-calendar-height,calc(100svh - 245px));min-height:0;align-items:stretch;overflow:hidden}
#home #calendar .calendar-box{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
#home #calendar .cal-top,#home #calendar .cal-view-switch,#home #calendar .weekdays{flex-shrink:0}
#home #calendar .cal-top{padding:13px 17px 6px}
#home #calendar .cal-view-switch{margin-top:3px;margin-bottom:7px}
#home #calendar .weekdays div{padding:5px 0}
#home #calendar #calGrid{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-bottom:8px}
#home #calendar #calGrid.view-month{display:flex;flex-direction:column}
#home #calendar #calGrid.view-month .calendar-week{flex:1 0 auto;min-height:calc(40px + var(--calendar-lanes)*var(--calendar-row))}
#home #calendar #calGrid .calendar-week-events{padding-top:31px}
#home #calendar #calGrid.view-week .calendar-week{min-height:100%;height:auto}
#home #calendar .calendar-cell{padding-top:6px;padding-bottom:6px}
#home #calendar .calendar-cell::after{top:4px}
#home #calendar .calendar-side{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;padding:18px}
#home #calendar .cal-aside-kicker{margin-bottom:3px;font-size:11px;flex:none}
#home #calendar .cal-aside-title{margin-bottom:10px;font-size:20px;line-height:1.4;flex:none}
#home #calendar #eventList{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#home #calendar .event-item{padding:9px 0;gap:10px}
#home #calendar .event-title{font-size:14px;margin-bottom:4px;line-height:1.4}
#home #calendar .event-sub{font-size:12px;line-height:1.5}
#home #calendar #calViewAll{flex:none;margin-top:10px;padding:8px 12px;min-height:0;font-size:14px}
@media(max-width:1000px){#home #calendar .calendar-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1.85fr) minmax(0,1fr);gap:10px}#home #calendar .calendar-side{padding:10px 15px}#home #calendar .cal-aside-kicker{display:none}#home #calendar .cal-aside-title{font-size:17px;margin-bottom:5px}#home #calendar #calViewAll{margin-top:5px;padding:5px 10px}#home #calendar .event-item{padding:6px 0}#home #calendar .event-date{height:42px;width:40px}#home #calendar .event-date b{font-size:18px}}
@media(max-width:600px){#home #calendar .cal-top{padding:9px 10px 4px;gap:6px}#home #calendar .cal-view-switch{margin-bottom:3px;padding:3px}#home #calendar .cal-view-switch button{padding:3px 12px}#home #calendar .weekdays div{padding:3px 0}#home #calendar .calendar-date-selectors select,#home #calendar .calendar-year-picker>button{padding:5px 9px}#home #calendar .cal-controls .icon-btn{width:30px;height:30px}}

.calendar-detail-filters{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;padding:15px 17px;border:1px solid #eee3e9;border-radius:13px 13px 0 0;background:#fff8fa}
.calendar-detail-filters label{display:grid;gap:5px;font-size:14px;font-weight:500;color:#8d4c63;min-width:150px}
.calendar-detail-filters select{width:100%;padding:8px 12px;border:1px solid #e8d6df;border-radius:8px;background:#fff;color:#655567;font-size:14px;min-height:38px}
.calendar-filter-reset{border:1px solid #e7d6de;background:#fff;color:#9b536c;font-size:14px;padding:7px 14px;min-height:38px}
.calendar-detail-table-wrap{max-width:100%;overflow:auto;border:1px solid #eee3e9;border-top:0;border-radius:0 0 13px 13px;background:#fff}
.calendar-detail-table{width:100%;min-width:760px;border-collapse:collapse;text-align:left;font-size:14px;line-height:1.6}
.calendar-detail-table thead th{padding:12px 14px;background:#fcf0f5;color:#94455e;font-weight:600;white-space:nowrap;border-bottom:1px solid #eadbe3}
.calendar-detail-table tbody td,.calendar-detail-table tbody th{padding:13px 14px;vertical-align:top;border-bottom:1px solid #f0e8ee;color:#747080;font-weight:400}
.calendar-detail-table tbody th{font-weight:600;color:#4d4256;min-width:180px}.calendar-detail-table tbody tr:nth-child(even){background:#fdfafb}.calendar-detail-table tbody tr:hover{background:#fff5f8}.calendar-detail-table tbody tr:last-child>*{border-bottom:0}
.calendar-detail-table .calendar-detail-description{min-width:190px;max-width:340px;white-space:pre-wrap;overflow-wrap:anywhere}.calendar-detail-table .calendar-detail-empty{text-align:center;padding:30px;color:#a1919f}
@media(max-width:600px){.calendar-detail-filters{gap:9px;padding:12px}.calendar-detail-filters label{flex:1;min-width:110px}.calendar-filter-reset{width:100%}.calendar-detail-table{font-size:13px}}

/* Three recent activities on narrow screens, fully visible without an inner scrollbar. */
@media(max-width:1000px){
 #home #calendar .calendar-layout{grid-template-rows:minmax(0,1fr) auto}
 #home #calendar .calendar-side{height:auto;min-height:0;overflow:visible}
 #home #calendar #eventList{flex:none;height:auto;max-height:none;min-height:0;overflow:visible;scrollbar-width:none}
 #home #calendar #eventList::-webkit-scrollbar{display:none}
 #home #calendar .event-item{padding:6px 0;align-items:center}
 #home #calendar .event-item>div:last-child{min-width:0;flex:1}
 #home #calendar .event-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px;line-height:1.35;margin-bottom:3px}
 #home #calendar .event-sub{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:11px;line-height:1.4}
}

/* Center the date and month together in recent activity badges. */
#calendar .event-date,#calendarArchive .event-date{
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 gap:0;padding:0;text-align:center;flex-shrink:0;
}
#calendar .event-date b,#calendarArchive .event-date b{
 display:block;margin:0;padding:0;line-height:1;
}
#calendar .event-date span,#calendarArchive .event-date span{
 display:block;margin:2px 0 0;padding:0;line-height:1;
}

/* Consistent month arrow and clearer homepage dates. */
.calendar-month-picker{position:relative;display:inline-flex;align-items:center;min-width:0}
#calendar .calendar-month-picker select,#calendarArchive .calendar-month-picker select{appearance:none;-webkit-appearance:none;padding-right:32px;background-image:none;width:100%;cursor:pointer}
.calendar-month-picker>span{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:#8f1021;font-size:19px;line-height:1}
#calendar .calendar-cell>span{font-size:16px;font-weight:600;color:#394150;font-variant-numeric:tabular-nums;line-height:1.4}
#calendar .calendar-cell.muted>span{color:#9299a5}
#calendar .calendar-cell.today>span,#calendar .calendar-cell.selected>span{color:#ad1735}
@media(max-width:600px){#calendar .calendar-cell>span{font-size:14px}}

#calendar .calendar-cell.today>span{font-weight:600}

/* Draw equal horizontal and vertical strokes at the circle's exact center. */
.calendar-cell::after{
 content:'';
 background-color:#bd1738;
 background-image:linear-gradient(#fff,#fff),linear-gradient(#fff,#fff);
 background-position:center,center;
 background-size:12px 2px,2px 12px;
 background-repeat:no-repeat;
}
@media(max-width:600px){.calendar-cell::after{background-size:10px 2px,2px 10px}}

/* Let the full homepage calendar grow naturally on tablets and phones. */
@media(max-width:1000px){
 #home #calendar .calendar-layout{height:auto;max-height:none;min-height:0;grid-template-rows:auto auto;overflow:visible}
 #home #calendar .calendar-box{height:auto;max-height:none;min-width:0;width:100%;overflow:visible}
 #home #calendar #calGrid{flex:none;height:auto;max-height:none;overflow:visible;overscroll-behavior:auto;width:100%;min-width:0}
 #home #calendar #calGrid.view-month .calendar-week{flex:none;min-height:calc(40px + var(--calendar-lanes)*var(--calendar-row))}
 #home #calendar #calGrid.view-week .calendar-week{height:auto;min-height:calc(60px + var(--calendar-lanes)*var(--calendar-row))}
 #home #calendar .calendar-cell{min-width:0}
 #home #calendar .calendar-week-events{min-width:0}
 #home #calendar .calendar-side{width:100%;min-width:0}
 #home #calendar .cal-top{min-width:0}
 #home #calendar .calendar-date-selectors{min-width:0;max-width:100%;flex-wrap:wrap}
 #home #calendar .calendar-month-picker{min-width:0;max-width:100%}
}
@media(max-width:600px){
 #home #calendar .cal-top{flex-wrap:wrap;justify-content:space-between}
 #home #calendar .calendar-date-selectors{gap:6px}
 #home #calendar .calendar-month-picker select{padding-right:26px;font-size:16px}
 #home #calendar .calendar-year-picker>button{font-size:16px;min-width:72px}
 #home #calendar .cal-controls{gap:4px;flex-shrink:0}
 #home #calendar #calGrid{padding-left:5px;padding-right:5px}
 #home #calendar .weekdays{padding-left:5px;padding-right:5px}
}

/* Center homepage calendar navigation icons within their button backgrounds. */
#home #calendar .cal-controls .icon-btn{
 display:inline-flex;align-items:center;justify-content:center;
 padding:0;line-height:1;box-sizing:border-box;flex-shrink:0;
}
#home #calendar .cal-controls .icon-btn .icon{
 display:block;margin:0;flex-shrink:0;vertical-align:initial;
}

/* Allow wheel scrolling to continue to the page at calendar/list boundaries. */
#home #calendar #calGrid,#home #calendar #eventList{overscroll-behavior-y:auto;overscroll-behavior-x:auto}

.calendar-event-bar{color:var(--event-text,var(--event-color))}
#calendar .event-type-label{display:block;font-size:11px;line-height:1.4;margin:2px 0}

/* Subtle internal grid without an outer frame in the annual calendar. */
#calendarArchive #calGrid.view-year .calendar-mini-month{border:0}
#calendarArchive #calGrid.view-year .calendar-mini-weekdays{font-size:10px;border:0}
#calendarArchive #calGrid.view-year .calendar-mini-weekdays>div{border-right:.5px solid #eff0f3;padding:3px 0}
#calendarArchive #calGrid.view-year .calendar-mini-weekdays>div:last-child{border-right:0}
#calendarArchive #calGrid.view-year .calendar-mini-month .calendar-week{border-left:0;border-bottom:.5px solid #eff0f3;min-height:calc(23px + var(--calendar-lanes)*14px + 4px)}
#calendarArchive #calGrid.view-year .calendar-mini-month .calendar-week:last-of-type{border-bottom:0}
#calendarArchive #calGrid.view-year .calendar-mini-month .calendar-week-days{border-top:0}
#calendarArchive #calGrid.view-year .calendar-mini-month .calendar-cell{font-size:11px;padding:3px;border-right:.5px solid #eff0f3;border-radius:0}
#calendarArchive #calGrid.view-year .calendar-mini-month .calendar-cell:last-child{border-right:0}
#calendarArchive #calGrid.view-year .calendar-mini-month .calendar-week-events{padding-top:23px}
#calendarArchive #calGrid.view-year .calendar-mini-month .calendar-cell.today>span{width:18px;height:18px}

/* Match the annual view's light internal grid in month and week views. */
:is(#calendar,#calendarArchive) #calGrid:is(.view-month,.view-week){border:0}
:is(#calendar,#calendarArchive) #calGrid:is(.view-month,.view-week) .calendar-week{border-left:0;border-top:0;border-right:0;border-bottom:.5px solid #eff0f3}
:is(#calendar,#calendarArchive) #calGrid:is(.view-month,.view-week) .calendar-week:last-child{border-bottom:0}
:is(#calendar,#calendarArchive) #calGrid:is(.view-month,.view-week) .calendar-cell{margin:0;border-right:.5px solid #eff0f3;border-radius:0}
:is(#calendar,#calendarArchive) #calGrid:is(.view-month,.view-week) .calendar-cell:last-child{border-right:0}
