.calendar-page{display:grid;gap:var(--s5)}
.calendar-toolbar,.calendar-navigation,.calendar-view-controls,.calendar-legend,.calendar-event-actions,.calendar-day-actions,.calendar-plan-pause{display:flex;align-items:center;gap:var(--s3);flex-wrap:wrap}
.calendar-toolbar{justify-content:space-between}.calendar-navigation{gap:var(--s2);flex-wrap:nowrap}.calendar-navigation h2{font-size:var(--text-lg);margin:0;min-width:0}.calendar-navigation .icon-btn{flex-shrink:0}
.calendar-mode{display:flex;border:1px solid var(--border);border-radius:var(--r2);padding:var(--s1);background:var(--surface-input)}
.calendar-mode button{min-height:44px;padding:var(--s2) var(--s3);border:0;border-radius:var(--r1);background:transparent;color:var(--text-secondary);font:inherit;cursor:pointer}.calendar-mode button.is-selected{background:var(--surface-elevated);color:var(--text-primary)}
.calendar-layout{display:grid;gap:var(--s5);align-items:start}.calendar-board{padding:var(--s2);overflow:hidden}.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-weekdays span{text-align:center;font-size:var(--text-xs);color:var(--text-muted);padding:var(--s3) 0;font-weight:600}
.calendar-day{display:flex;flex-direction:column;gap:var(--s1);min-width:0;min-height:70px;padding:var(--s2) var(--s1);border:1px solid transparent;border-top-color:var(--border);border-radius:var(--r1);background:transparent;color:var(--text-primary);font:inherit;text-align:left;cursor:pointer}
.calendar-day:hover{background:var(--surface-elevated)}.calendar-day.is-selected{border-color:var(--accent);background:var(--surface-elevated)}.calendar-day.is-today .calendar-day-number{background:var(--accent);color:var(--background);border-radius:50%}.calendar-day.outside-month .calendar-day-number{color:var(--text-muted)}.calendar-day.is-today.outside-month .calendar-day-number{color:var(--background)}
.calendar-day-number{display:grid;place-items:center;width:28px;height:28px;align-self:center;font-size:var(--text-sm);font-variant-numeric:tabular-nums}.calendar-day-items{display:flex;justify-content:center;gap:2px;flex-wrap:wrap}.calendar-marker{display:inline-flex;align-items:center;gap:var(--s1);color:var(--accent);min-width:0}.calendar-marker span{display:none}.calendar-marker.is-completed{color:var(--success)}.calendar-marker.is-pause{color:var(--text-secondary)}.calendar-more{font-size:10px;color:var(--text-muted)}
.calendar-legend{padding:var(--s3) var(--s2);font-size:var(--text-xs);color:var(--text-secondary);gap:var(--s3)}.calendar-legend span{display:flex;align-items:center;gap:var(--s1)}
.calendar-detail{min-width:0;display:grid;gap:var(--s3)}.calendar-detail .section-title{margin-bottom:0}.calendar-detail .section-title h2{font-size:var(--text-lg)}.calendar-event{padding:var(--s4)}.calendar-event-heading{display:flex;align-items:center;gap:var(--s3)}.calendar-event-heading>div{min-width:0}.calendar-event h3{font-size:var(--text-base);overflow-wrap:anywhere;margin:var(--s1) 0}.calendar-event-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:var(--r1);background:var(--surface-input);color:var(--accent);flex-shrink:0}.calendar-event.is-pause .calendar-event-icon{color:var(--text-secondary)}.calendar-event-actions{margin-top:var(--s3)}.calendar-event-actions .btn{font-size:var(--text-sm);padding-inline:var(--s3)}.calendar-day-actions>*{flex:1}.calendar-plan-pause>div{flex:1;min-width:160px}.calendar-plan-pause p{margin:var(--s2) 0 0}
.calendar-context h2{font-size:var(--text-lg)}.calendar-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s4);margin:var(--s4) 0}.calendar-totals span{display:flex;flex-direction:column;gap:var(--s1);font-size:var(--text-xs);color:var(--text-secondary)}.calendar-totals strong{color:var(--text-primary);font-size:var(--h2);font-variant-numeric:tabular-nums}
@media(min-width:760px){.calendar-board{padding:var(--s4)}.calendar-day{min-height:112px;padding:var(--s2)}.calendar-day-number{align-self:flex-start}.calendar-day-items{flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap}.calendar-marker{font-size:var(--text-xs);line-height:1.5}.calendar-marker span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calendar-marker svg{flex-shrink:0}.calendar-totals{grid-template-columns:repeat(4,minmax(0,1fr))}.calendar-week .calendar-day{min-height:180px}.calendar-navigation h2{font-size:var(--h3)}}
@media(min-width:1200px){.calendar-layout{grid-template-columns:minmax(0,1fr) minmax(260px,320px)}.calendar-detail{position:sticky;top:var(--s5)}}
