.home-calendar { margin: 0 0 32px; padding: 24px; border: 1px solid #e5edef; border-radius: 20px; background: #fff; box-shadow: 0 4px 18px rgba(35,70,75,.04); }
.home-calendar-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.home-calendar-heading h2 { margin: 0; font-size: 22px; font-weight: 700; color: #263b40; }
.home-calendar-month { padding: 7px 16px; border-radius: 20px; background: #eaf8f9; color: #287b82; font-size: 16px; font-weight: 700; }
.home-calendar-caption { margin: 12px 0 20px; color: #718187; font-size: 13px; line-height: 1.7; }
.home-calendar-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.home-calendar-table th { padding: 10px 0; text-align: center; background: #f4f9fa; color: #718187; font-size: 13px; font-weight: 600; }
.home-calendar-table th:first-child { color: #ce737b; }
.home-calendar-table th:last-child { color: #5983bd; }
.home-calendar-table td { height: 92px; border: 1px solid #e5edef; padding: 9px; vertical-align: top; text-align: center; }
.home-calendar-table td.is-empty { background: #fafcfc; }
.home-calendar-day { display: block; width: 28px; height: 28px; line-height: 28px; margin: 0 auto 6px; color: #405259; font-size: 14px; }
.home-calendar-table td:first-child .home-calendar-day { color: #ce737b; }
.home-calendar-table td:last-child .home-calendar-day { color: #5983bd; }
.home-calendar-table td.is-today { background: #f1fbfb; }
.home-calendar-table td.is-today .home-calendar-day { color: #fff; background: #4abac0; border-radius: 50%; font-weight: 700; }
.home-calendar-titles { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.home-calendar-title { display: block; width: 100%; max-width: 100%; box-sizing: border-box; padding: 4px 10px; border-radius: 10px; background: #e0f4f5; color: #247b82; font-size: 14px; font-weight: 600; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.home-calendar-title:hover { background: #4abac0; color: #fff; text-decoration: none; }
.home-calendar-title:focus-visible { outline: 3px solid #4abac0; outline-offset: 3px; }
.home-calendar-zero span { font-size: 11px; font-weight: 400; }
.home-calendar-zero { display: inline-block; padding-top: 4px; color: #b5c0c4; font-size: 16px; }
body.theme-dark .home-calendar { background: #242d35; border-color: #46505c; }
body.theme-dark .home-calendar-heading h2, body.theme-dark .home-calendar-day { color: #edf4f5; }
body.theme-dark .home-calendar-table td { border-color: #46505c; }
body.theme-dark .home-calendar-table th, body.theme-dark .home-calendar-table td.is-empty { background: #2b343d; }
body.theme-dark .home-calendar-table td.is-today { background: #17383b; }
body.theme-dark .home-calendar-caption { color: #b8c0ca; }
@media (max-width: 600px) {
  .home-calendar { padding: 16px 10px; border-radius: 16px; margin-bottom: 24px; }
  .home-calendar-heading h2 { font-size: 18px; }
  .home-calendar-month { font-size: 14px; padding: 5px 12px; }
  .home-calendar-table td { height: 78px; padding: 6px 2px; }
  .home-calendar-title { padding: 4px 2px; font-size: 11px; }
  .home-calendar-caption { font-size: 12px; }
}

.home-calendar-navigation { display: flex; align-items: center; gap: 8px; }
.home-calendar-arrow { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #d4e8eb; border-radius: 50%; color: #287b82; font-size: 28px; line-height: 1; text-decoration: none; }
.home-calendar-arrow svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-calendar-arrow:hover { background: #eaf8f9; color: #247b82; text-decoration: none; }
.home-calendar-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.home-calendar-filters > div { flex: 1; min-width: 150px; }
.home-calendar-filters label { display: block; margin-bottom: 6px; font-size: 13px; color: #718187; }
.home-calendar-filters select { width: 100%; height: 44px; border: 1px solid #dce7e9; border-radius: 10px; padding: 8px 12px; background: #fff; color: #405259; font: inherit; }
.home-calendar-arrow:focus-visible, .home-calendar-filters :focus-visible { outline: 3px solid #4abac0; outline-offset: 3px; }
#homeCalendarTitle { scroll-margin-top: 120px; }
body.theme-dark .home-calendar-filters select { background: #2b343d; border-color: #46505c; color: #edf4f5; }
body.theme-dark .home-calendar-filters label { color: #b8c0ca; }
@media (max-width: 600px) { .home-calendar-filters > div { min-width: 120px; } }

.home-calendar-more { color: #247b82; font-size: 11px; line-height: 1.5; text-decoration: none; }
.home-calendar-more:hover { text-decoration: underline; }
.home-calendar-more:focus-visible { outline: 3px solid #4abac0; outline-offset: 3px; }
body.theme-dark .home-calendar-more { color: #83d6db; }

.home-calendar-short-title, .home-calendar-mobile-only { display: none; }
@media (max-width: 600px) {
  .home-calendar-full-title, .home-calendar-desktop-only { display: none; }
  .home-calendar-short-title { display: inline; }
  .home-calendar-mobile-only { display: block; }
}

/* Weekly overlays span the day grid instead of repeating a title in each cell. */
.home-calendar-weekdays, .home-calendar-dates, .home-calendar-bands, .home-calendar-overflow { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); }
.home-calendar-weekdays { background:#f4f9fa; color:#718187; font-size:13px; text-align:center; }
.home-calendar-weekdays span { padding:10px 0; }
.home-calendar-weekdays span:first-child, .home-calendar-cell:first-child .home-calendar-day { color:#ce737b; }
.home-calendar-weekdays span:last-child, .home-calendar-cell:last-child .home-calendar-day { color:#5983bd; }
.home-calendar-week { position:relative; padding-top:42px; border-bottom:1px solid #e5edef; --band-height:24px; --rows:var(--desktop-rows); }
.home-calendar-dates { position:absolute; inset:0; }
.home-calendar-cell { min-width:0; text-align:center; border-left:1px solid #e5edef; padding-top:5px; }
.home-calendar-cell:last-child { border-right:1px solid #e5edef; }
.home-calendar-cell.is-empty { background:#fafcfc; }
.home-calendar-cell.is-today { background:#f1fbfb; }
.home-calendar-cell.is-today .home-calendar-day { border-radius:50%; background:#4abac0; color:white; font-weight:700; }
.home-calendar-bands { position:relative; grid-template-rows:repeat(var(--rows), var(--band-height)); gap:3px 0; }
.home-calendar-band { min-width:0; margin:0 3px; padding:3px 6px; border-radius:4px; background:#d9f0f1; color:#246971; font-size:12px; font-weight:500; line-height:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none; text-align:left; }
.home-calendar-band.continues-before { border-top-left-radius:0; border-bottom-left-radius:0; margin-left:0; }
.home-calendar-band.continues-after { border-top-right-radius:0; border-bottom-right-radius:0; margin-right:0; }
.home-calendar-band:hover { background:#4abac0; color:white; text-decoration:none; }
.home-calendar-band:focus-visible { outline:2px solid #247b82; outline-offset:1px; z-index:1; }
.home-calendar-overflow { position:relative; min-height:22px; text-align:center; }
body.theme-dark .home-calendar-week, body.theme-dark .home-calendar-cell { border-color:#46505c; }
body.theme-dark .home-calendar-weekdays, body.theme-dark .home-calendar-cell.is-empty { background:#2b343d; }
body.theme-dark .home-calendar-cell.is-today { background:#17383b; }
body.theme-dark .home-calendar-band { background:#21474d; color:#b9ecee; }
@media(max-width:600px) {
  .home-calendar-week { --band-height:22px; padding-top:38px; }
  .home-calendar-band { font-size:9px; line-height:16px; padding:3px 1px; margin-left:1px; margin-right:1px; letter-spacing:-.02em; }
  .home-main > .home-calendar {
    box-sizing:border-box; width:calc(100vw - 12px); max-width:none;
    margin-left:calc(50% - 50vw + 6px); margin-right:0; padding:16px 4px;
    border-radius:12px;
  }
  .home-calendar-heading, .home-calendar-caption, .home-calendar-filters { margin-left:6px; margin-right:6px; }
}
