/* Calendar shares the existing Ludens themes and navigation. */
#calendar-view{--cal-accent:var(--cyan,#75dfff);--cal-fill:rgba(112,214,242,.10);--cal-surface:rgba(13,23,31,.76);--cal-soft:rgba(255,255,255,.035);max-width:1600px}
:root[data-theme="white"] #calendar-view{--cal-accent:#6d53c4;--cal-fill:rgba(118,91,197,.09);--cal-surface:#fff;--cal-soft:#f8f9fc}
.calendar-heading{margin-bottom:24px;align-items:center}.calendar-heading h1{margin-bottom:4px}.calendar-heading p{margin-bottom:0}.calendar-actions,.calendar-month-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.calendar-actions button{white-space:nowrap}
.calendar-layout{display:grid;grid-template-columns:225px minmax(0,1fr);gap:24px;align-items:start}.calendar-side{display:flex;flex-direction:column;gap:20px}.calendar-side>.panel{padding:20px}.calendar-side h2{font-size:1rem;margin:0 0 16px}.calendar-sources{display:flex;flex-direction:column;gap:12px}.calendar-source{display:flex;gap:10px;align-items:flex-start;min-width:0}.calendar-source label{display:flex;align-items:flex-start;gap:10px;min-width:0;flex:1;cursor:pointer}.calendar-source input{width:18px;height:18px;min-height:18px;margin:2px 0 0;accent-color:var(--source-color);flex-shrink:0}.calendar-source-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.calendar-source-copy strong{font-size:.88rem;font-weight:600;overflow-wrap:anywhere}.calendar-source-copy small{font-size:.73rem;color:var(--muted)}.calendar-source-remove{padding:0!important;min-width:24px!important;min-height:24px!important;background:none!important;border:0!important;color:var(--muted);font-size:1.2rem}.calendar-source-warning{color:#c78d29!important}.calendar-side p{font-size:.85rem;line-height:1.55;margin:12px 0 0}.calendar-side .text-button{padding:0;min-height:40px;text-align:left}
.calendar-main{min-width:0}.calendar-board{padding:0!important;overflow:hidden;background:var(--cal-surface)}.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:22px 24px;border-bottom:1px solid var(--line)}.calendar-toolbar h2{margin:0;font-size:1.45rem;letter-spacing:-.025em}.calendar-month-controls{flex-wrap:nowrap;gap:6px}.calendar-month-controls .calendar-arrow{width:36px;min-width:36px;min-height:36px;padding:0;font-size:1.4rem;line-height:1}.calendar-month-controls button{min-height:36px}.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-weekdays{padding:13px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:.72rem;font-weight:650;text-align:center;text-transform:uppercase;letter-spacing:.05em}.calendar-day{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:5px;text-align:left;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--text);padding:9px;min-width:0;min-height:116px;transition:background 150ms ease}.calendar-day:nth-child(7n){border-right:0}.calendar-day:hover{background:var(--cal-soft)}.calendar-day.is-selected{background:var(--cal-fill);box-shadow:inset 0 0 0 1.5px var(--cal-accent)}.calendar-day.is-outside{opacity:.4}.calendar-day-number{display:grid;place-items:center;align-self:flex-end;width:28px;height:28px;border-radius:50%;font-size:.82rem}.calendar-day.is-today .calendar-day-number{background:var(--cal-accent);color:white;font-weight:700}.calendar-day-event{display:block;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border-left:3px solid var(--source-color);border-radius:3px;padding:3px 4px;background:var(--cal-soft);font-size:.7rem;line-height:1.3;font-weight:500}.calendar-more{font-size:.67rem;color:var(--muted);padding-left:4px}.calendar-dots{display:none;justify-content:center;gap:3px}.calendar-dots i{width:5px;height:5px;background:var(--source-color);border-radius:50%}
.calendar-agenda{margin-top:20px;padding:22px 24px}.calendar-agenda-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.calendar-agenda-heading h2{font-size:1.1rem;margin:0}.calendar-agenda-heading .text-button{min-height:36px;padding:0}.calendar-agenda-list{display:flex;flex-direction:column;gap:10px}.calendar-event-row{display:grid;grid-template-columns:94px minmax(0,1fr) 20px;gap:14px;align-items:center;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--cal-surface);color:var(--text);padding:14px;width:100%;min-width:0}.calendar-event-row:hover{background:var(--cal-soft)}.calendar-event-time{font-size:.8rem;line-height:1.5;color:var(--muted)}.calendar-event-copy{border-left:3px solid var(--source-color);padding-left:13px;display:flex;flex-direction:column;gap:5px;min-width:0}.calendar-event-copy strong{font-size:.95rem;overflow-wrap:anywhere}.calendar-event-copy small{color:var(--muted);font-size:.77rem;overflow-wrap:anywhere}.calendar-agenda-empty{color:var(--muted);font-size:.9rem;padding:16px 0}.calendar-status{margin:0 0 16px;line-height:1.5;color:var(--muted);font-size:.88rem;overflow-wrap:anywhere}.calendar-status:empty{display:none}.calendar-status.is-error{color:#cd6f48}.calendar-footnote{font-size:.75rem;color:var(--muted);margin:12px 4px}.calendar-muted-note{color:var(--muted);font-size:.85rem}.calendar-dialog{width:min(560px,calc(100% - 32px));max-height:85dvh}.calendar-dialog h2{margin:0 0 8px}.calendar-dialog .calendar-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}.calendar-form>label{display:flex;flex-direction:column;gap:7px;font-size:.85rem;min-width:0}.calendar-form input:not([type=checkbox]),.calendar-form textarea{width:100%;min-width:0;box-sizing:border-box}.calendar-form input[type=checkbox]{width:18px;min-height:18px;height:18px;accent-color:var(--purple)}.calendar-form .calendar-wide{grid-column:1/-1}.calendar-form .calendar-checkbox{flex-direction:row;align-items:center}.calendar-form textarea{min-height:84px;resize:vertical}.calendar-dialog footer{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.calendar-dialog footer .danger{margin-right:auto}.calendar-dialog-status{min-height:1em;color:#cd6f48;overflow-wrap:anywhere}.calendar-detail{display:flex;flex-direction:column;gap:14px;white-space:pre-wrap;overflow-wrap:anywhere}.calendar-detail p{margin:0}.calendar-dialog [hidden]{display:none!important}
@media(min-width:1500px){.calendar-day{min-height:130px}}
@media(max-width:1100px){.calendar-layout{grid-template-columns:180px minmax(0,1fr);gap:16px}.calendar-side>.panel{padding:16px}.calendar-day{min-height:100px;padding:6px}.calendar-toolbar{padding:18px}.calendar-toolbar h2{font-size:1.2rem}.calendar-day-event{font-size:.64rem}}
@media(max-width:1100px){.calendar-layout{grid-template-columns:1fr}.calendar-main{grid-row:1}.calendar-side{grid-row:2;display:grid;grid-template-columns:1fr 1fr;gap:16px}.calendar-heading{align-items:flex-start;flex-direction:column;gap:16px}.calendar-actions{width:100%}.calendar-actions button{flex:1;min-height:42px;font-size:.82rem;padding:9px 12px}.calendar-actions #calendar-refresh{flex:0 0 auto}.calendar-day{min-height:88px}.calendar-day-number{align-self:center}.calendar-footnote{line-height:1.5}}
@media(max-width:500px){.calendar-day{min-height:58px;padding:5px 2px;gap:3px}.calendar-day-event,.calendar-more{display:none}.calendar-dots{display:flex}.calendar-weekdays{font-size:.62rem;padding:10px 0}.calendar-toolbar{padding:14px 12px;gap:8px}.calendar-toolbar h2{font-size:1.1rem}.calendar-month-controls{gap:3px}.calendar-month-controls button{font-size:.75rem;padding:6px 8px}.calendar-month-controls .calendar-arrow{width:32px;min-width:32px;font-size:1.25rem}.calendar-agenda{padding:18px 14px}.calendar-event-row{grid-template-columns:72px minmax(0,1fr) 12px;gap:8px;padding:12px 10px}.calendar-event-copy{padding-left:10px}.calendar-event-copy strong{font-size:.86rem}.calendar-event-time{font-size:.73rem}.calendar-side{grid-template-columns:1fr}.calendar-dialog{width:100%;margin:auto 0 0;max-height:90dvh}.calendar-form input{font-size:16px}.calendar-dialog .calendar-form{gap:14px}.calendar-heading h1{font-size:2rem}}
@media(prefers-reduced-motion:reduce){.calendar-day{transition:none}}
