.calendar-page {overflow:auto;height:100dvh;min-height:100dvh;color:var(--ink);background:var(--paper)}
.calendar-header {max-width:1184px;margin:auto;padding:24px 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.calendar-header a,.calendar-back {text-decoration:none}
.calendar-main {max-width:1184px;margin:auto;padding:36px 32px 64px}
.calendar-heading,.agenda-heading,.editor-heading {display:flex;justify-content:space-between;align-items:center;gap:16px}
.calendar-heading h1 {font-size:30px;letter-spacing:-.025em;margin:0 0 8px}
.calendar-heading p,.calendar-status,.calendar-hint,.agenda-heading p {font-size:14px;color:var(--muted);margin:0;line-height:1.6}
.calendar-status {min-height:24px;margin:18px 0}
.calendar-layout {display:grid;grid-template-columns:minmax(300px,440px) minmax(0,1fr);gap:40px;align-items:start}
.month-section {background:var(--sidebar);border-radius:14px;padding:20px}
.month-toolbar {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:22px}
.month-toolbar h2 {font-size:19px;margin:0;white-space:nowrap}
.month-toolbar>div {display:flex;align-items:center;gap:4px}
.month-toolbar .button {padding:8px 10px;min-width:44px;background:transparent}
.month-arrow svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.weekdays,.month-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.weekdays span {text-align:center;font-size:13px;color:var(--muted);padding-bottom:12px}
.calendar-day {min-height:52px;min-width:0;padding:6px 0;border:1px solid transparent;border-radius:9px;background:transparent;color:inherit;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;font-variant-numeric:tabular-nums;cursor:pointer}
.calendar-day:hover {background:var(--selected)}
.calendar-day.is-today {border-color:#6081bd}
.calendar-day[aria-pressed=true] {background:var(--blue);color:#fff}
.calendar-day .day-number {font-size:16px;font-weight:600}
.calendar-day .day-count {font-size:11px;line-height:1.2;min-height:13px}
.calendar-hint {font-size:12px;margin-top:18px}
.agenda-heading {padding:4px 0 20px;border-bottom:1px solid var(--line)}
.agenda-heading h2 {font-size:22px;margin:0 0 6px}
.agenda-list {margin:0;padding:0;list-style:none}
.agenda-item {display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:12px;align-items:start;padding:22px 0;border-bottom:1px solid var(--line)}
.agenda-toggle {width:24px;height:24px;margin:9px 0 0;accent-color:var(--blue);cursor:pointer}
.agenda-content {min-width:0}
.agenda-content h3 {margin:4px 0 8px;font-size:17px;line-height:1.5;overflow-wrap:anywhere}
.agenda-meta {font-size:13px;color:var(--muted);line-height:1.6}
.agenda-notes {white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7;margin:12px 0 0}
.agenda-item.is-completed h3 {text-decoration:line-through;color:var(--muted)}
.agenda-item.is-cancelled h3 {color:var(--muted)}
.agenda-actions {display:flex;flex-direction:column;gap:2px}
.agenda-actions .button {padding:8px 10px;border-color:transparent;font-size:13px;background:transparent}
.agenda-empty {padding:30px 0;font-size:15px;color:var(--muted);line-height:1.8}
.event-editor {max-width:640px;margin:36px 0 0 auto;padding-top:26px;border-top:1px solid #b9c7dc;scroll-margin-top:24px}
.editor-heading {margin-bottom:24px}
.editor-heading h2 {font-size:22px;margin:0}
.calendar-field {display:flex;flex-direction:column;gap:8px;margin-bottom:20px;min-width:0}
.calendar-field label {font-size:14px;font-weight:600}
.calendar-field input,.calendar-field select,.calendar-field textarea {width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid #b9c7dc;background:#fff;border-radius:8px;font:inherit;color:inherit;box-sizing:border-box}
.calendar-field textarea {resize:vertical;line-height:1.6}
.calendar-field input::placeholder,.calendar-field textarea::placeholder {color:var(--muted)}
.calendar-field input:focus,.calendar-field textarea:focus,.calendar-field select:focus {outline:2px solid var(--blue);outline-offset:2px}
.event-form-row {display:grid;grid-template-columns:1fr 1fr;gap:20px}
.all-day-label {display:flex;align-items:center;gap:10px;min-height:44px;margin-bottom:14px;font-size:14px}
.all-day-label input {width:20px;height:20px;accent-color:var(--blue)}
.editor-actions {display:flex;align-items:center;gap:16px}
#editor-save-state {font-size:14px;color:var(--muted)}
.calendar-error {padding:16px 20px;background:var(--error-bg);color:var(--error);border-radius:10px;margin:16px 0}
.calendar-error p {margin:0 0 10px}
.calendar-entry {display:flex;gap:10px;align-items:center;text-decoration:none;margin:0 18px 18px;padding:0 14px;min-height:44px;color:var(--blue);font-size:14px;font-weight:600}
.topbar-calendar {flex-shrink:0;text-decoration:none;font-size:14px;padding:8px 12px;margin-left:auto}
@media(max-width:760px) {
 .calendar-header {padding:18px 20px}.calendar-main {padding:26px 16px 48px}.calendar-heading h1 {font-size:26px}
 .calendar-layout {grid-template-columns:minmax(0,1fr);gap:28px}.month-section {padding:16px}.month-toolbar {margin-bottom:14px}
 .calendar-day {min-height:48px}.month-grid,.weekdays {gap:0}.calendar-main .button {min-height:44px}.agenda-item {gap:10px;padding:18px 0}
 .event-editor {margin-top:28px}.event-form-row {gap:12px}.calendar-heading {gap:10px}.calendar-heading p {font-size:13px}
 .topbar-calendar {font-size:13px;padding:8px;margin-left:0}.calendar-entry {margin-left:18px}.calendar-header .brand {font-size:19px}
}
