.calendar-page { --cal-line: #e2e6df; --cal-muted: #64736c; }
.cal-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.cal-heading h1 { margin: 0; }
.cal-heading p { margin: 7px 0 0; color: var(--cal-muted); }
.cal-heading > button { flex: none; }
.cal-board { background: #fff; border: 1px solid var(--cal-line); border-radius: 18px; overflow: hidden; }
.cal-toolbar, .cal-nav, .cal-footer { display: flex; align-items: center; }
.cal-toolbar { justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px; }
.cal-nav { gap: 7px; flex-wrap: wrap; }
.cal-nav h2 { margin: 0 4px; font-size: 1.15rem; font-weight: 650; letter-spacing: -.025em; }
.cal-nav-btn, .cal-add-day { display: inline-grid; place-items: center; color: #3d5246; background: transparent; border: 1px solid var(--cal-line); cursor: pointer; border-radius: 8px; }
.cal-nav-btn { width: 36px; height: 36px; padding: 8px; }
.cal-nav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cal-today-btn { min-height: 36px; margin-left: 4px; padding: 5px 13px; font-size: .89rem; }
.cal-filter { max-width: 100%; border: 1px solid var(--cal-line); color: #35453d; background-color: #fff; border-radius: 9px; padding: 8px 33px 8px 12px; font: inherit; font-size: .9rem; }
.cal-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); border-top: 1px solid var(--cal-line); }
.cal-day { min-width: 0; min-height: 330px; border-inline-start: 1px solid var(--cal-line); }
.cal-day:first-child { border-inline-start: none; }
.cal-day-heading { padding: 14px 10px 12px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--cal-line); background: #f8faf7; }
.cal-day-heading > span { font-size: .81rem; font-weight: 600; color: var(--cal-muted); }
.cal-day-heading > strong { font-size: 1.12rem; font-weight: 650; color: #35473f; }
.cal-day-heading > strong[aria-current] { color: #a84330; }
.cal-add-day { width: 25px; height: 25px; align-self: center; margin-inline-start: auto; padding: 0; border-color: transparent; }
.cal-add-day:hover, .cal-nav-btn:hover { background: #edf2ec; }
.cal-is-today .cal-day-heading { background: #faede7; }
.cal-is-today { background: #fffdfa; }
.cal-events { padding: 10px 7px; display: grid; gap: 8px; }
.cal-event { display: grid; gap: 4px; width: 100%; min-width: 0; padding: 10px 9px; text-align: left; border: 1px solid #e1e7df; border-color: color-mix(in srgb,var(--person) 28%,white); border-inline-start: 3px solid var(--person); border-radius: 8px; background: #f1f5ef; background: color-mix(in srgb,var(--person) 10%,white); color: #293b34; font-family: inherit; cursor: grab; overflow-wrap: anywhere; }
.cal-event:hover { filter: brightness(.97); }
.cal-event:active { cursor: grabbing; }
.cal-event strong { font-size: .94rem; line-height: 1.32; font-weight: 650; }
.cal-event-time, .cal-event-place { font-size: .78rem; line-height: 1.4; color: #4d5d53; }
.cal-event-time { font-variant-numeric: tabular-nums; }
.cal-event-person { margin-top: 6px; display: flex; align-items: center; gap: 5px; font-size: .78rem; line-height: 1.3; }
.cal-event-person i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--person); }
.cal-empty { padding: 4px; font-size: .81rem; color: var(--cal-muted); }
.cal-drop { box-shadow: inset 0 0 0 2px #729174; background: #e9f2e9; }
.cal-dragging { opacity: .55; }
.cal-footer { padding: 13px 18px; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--cal-line); color: var(--cal-muted); font-size: .81rem; }
.cal-form { display: grid; gap: 13px; }
.cal-form .field { display: block; min-width: 0; margin: 0; }
.cal-form :is(input,select,textarea) { display: block; width: 100%; margin-top: 5px; font: inherit; }
.cal-form textarea { resize: vertical; }
.cal-optional { font-size: .8rem; color: #66746c; font-weight: 400; }
.cal-form-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.cal-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-delete { border: 0; background: transparent; color: #a23c2e; margin-right: auto; padding: 10px 3px; font: inherit; font-weight: 600; cursor: pointer; }
.cal-confirm p { margin-top: 0; line-height: 1.6; overflow-wrap: anywhere; }
.cal-scope-actions { display: grid; justify-content: stretch; gap: 8px; }
.cal-scope-actions .btn { white-space: normal; }
@media (max-width: 1150px) and (min-width: 861px) {
  .cal-day-heading { gap: 4px; padding-inline: 6px; }
  .cal-add-day { width: 21px; }
  .cal-events { padding-inline: 5px; }
  .cal-event { padding-inline: 6px; }
}
@media (max-width: 860px) {
  .cal-week { grid-template-columns: 1fr; }
  .cal-day { min-height: 0; display: grid; grid-template-columns: 75px minmax(0,1fr); border-inline-start: none; border-bottom: 1px solid var(--cal-line); }
  .cal-day:last-child { border-bottom: 0; }
  .cal-day-heading { flex-flow: column; align-items: center; justify-content: flex-start; gap: 1px; padding: 12px 3px; border-bottom: 0; border-inline-end: 1px solid var(--cal-line); }
  .cal-day-heading > strong { font-size: 1.3rem; }
  .cal-add-day { margin: 2px 0 0; height: 29px; width: 32px; }
  .cal-events { align-content: center; padding: 10px; }
  .cal-event { cursor: pointer; padding: 10px 12px; }
  .cal-empty { padding-left: 3px; }
  .cal-drag-tip { display: none; }
}
@media (max-width: 550px) {
  .cal-heading { flex-wrap: wrap; margin-bottom: 16px; }
  .cal-toolbar { padding: 12px; }
  .cal-nav { gap: 4px; }
  .cal-nav h2 { font-size: 1rem; }
  .cal-today-btn { margin-left: 0; }
  .cal-day { grid-template-columns: 61px minmax(0,1fr); }
  .cal-form-pair { gap: 9px; }
}
.repeat-editor { display: grid; gap: .65rem; }
.repeat-editor [data-pattern] { display: grid; gap: .7rem; padding: .8rem; border: 1px solid #dce4da; border-radius: .7rem; background: #f6f8f4; }
.repeat-editor [hidden] { display: none !important; }
.repeat-details { display: flex; gap: .5rem; align-items: flex-end; }
.repeat-details .field { max-width: 7rem; }
.repeat-details > span { padding-bottom: .68rem; }
.repeat-weekdays { display: flex; flex-wrap: wrap; padding: 0; margin: 0; border: none; gap: .3rem; }
.repeat-weekdays legend { font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.repeat-weekdays label { position: relative; cursor: pointer; }
.repeat-weekdays label > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.repeat-weekdays label > span:first-of-type { display: inline-flex; justify-content: center; padding: .44rem .5rem; border: 1px solid #d1dacd; border-radius: 7px; font-size: .85rem; background: #fff; color: #394d45; }
.repeat-weekdays input:checked + span { font-weight: 650; background: #365e50; color: white; border-color: #365e50; }
.repeat-weekdays input:focus-visible + span { outline: 2px solid #a44632; outline-offset: 2px; }
.repeat-month-note { font-size: .85rem; margin: 0; color: #53685c; }
.repeat-symbol { font-size: 1rem; margin-inline-start: .15em; color: #49695b; }
