.szv-calendar-page { width: min(1120px, calc(100% - 32px)); margin: 36px auto; }
.szv-calendar { --szv-accent: #a21823; --szv-rule: #dedbd9; color: #242222; }
.szv-calendar a { color: var(--szv-accent); }
.szv-calendar a:focus-visible, .szv-calendar button:focus-visible { outline: 2px solid #147d78; outline-offset: 4px; }
.szv-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.szv-controls form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; margin: 0 0 0 auto; }
.szv-controls form label { flex: 1 1 210px; min-width: 0; }
.szv-controls input[type="search"] { box-sizing: border-box; width: 100%; }
.szv-controls input, .szv-controls button { min-height: 40px; }
.szv-controls [aria-current] { font-weight: 700; text-decoration: underline; }
.szv-period { justify-content: space-between; }
.szv-period h2 { margin: 0; font-size: 22px; }
.szv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--szv-rule); }
.szv-weekday { background: #f5f3f1; font-weight: 700; text-align: center; padding: 8px; }
.szv-day, .szv-empty-day { min-height: 104px; border-top: 1px solid var(--szv-rule); border-right: 1px solid var(--szv-rule); padding: 8px; overflow-wrap: anywhere; }
.szv-day-link { font-size: 13px; font-weight: 700; }
.szv-month-event { display: block; margin: 6px 0; font-size: 14px; line-height: 1.35; }
.szv-calendar .szv-event-list { list-style: none; padding: 0; margin: 0; }
.szv-event { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--szv-rule); }
.szv-event-image { flex: 0 0 96px; height: 96px; }
.szv-event-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.szv-event > div { min-width: 0; overflow-wrap: anywhere; }
.szv-event p, .szv-event h3 { margin: 0; }
.szv-event h3 { font-size: 18px; overflow-wrap: anywhere; }
.szv-event-time { font-size: 14px; color: #56524f; }
.szv-event-details dt { font-weight: 700; }
.szv-calendar-workspace {
    --szv-ink: #20262e;
    --szv-muted: #505963;
    --szv-line: #d8dce0;
    --szv-surface: #fff;
    --szv-subtle: #f3f4f6;
    max-width: 1180px;
    container: szv-preview / inline-size;
}
.szv-calendar-workspace h1 { margin: 0 0 12px; color: var(--szv-ink); font-size: 23px; font-weight: 600; }
.szv-calendar-page h1 { margin-bottom: 20px; font-size: 30px; }
.szv-preview-banner {
    margin: 0 0 14px;
    padding: 8px 12px;
    border-left: 3px solid #a21823;
    background: var(--szv-subtle);
    color: var(--szv-ink);
}
.szv-calendar-workspace .szv-calendar { color: var(--szv-ink); }
.szv-preview-toolbar, .szv-preview-period {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}
.szv-preview-toolbar { justify-content: space-between; margin-bottom: 12px; }
.szv-preview-period h2 { margin: 0; font-size: 19px; line-height: 1.35; }
.szv-preview-arrows, .szv-preview-views {
    display: inline-flex;
    border: 1px solid var(--szv-line);
    border-radius: 6px;
    background: var(--szv-surface);
}
.szv-preview-arrows a, .szv-preview-views a, a.szv-preview-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    color: var(--szv-ink);
    font-weight: 600;
    text-decoration: none;
}
.szv-preview-arrows a { width: 36px; padding: 0; }
.szv-preview-arrows a:first-child, .szv-preview-views a:first-child {
    border-right: 1px solid var(--szv-line);
    border-radius: 5px 0 0 5px;
}
.szv-preview-arrows a:last-child, .szv-preview-views a:last-child { border-radius: 0 5px 5px 0; }
a.szv-preview-today { border: 1px solid var(--szv-line); border-radius: 6px; background: var(--szv-surface); }
.szv-preview-arrows a:hover, .szv-preview-views a:hover, a.szv-preview-today:hover { background: var(--szv-subtle); }
.szv-preview-views a[aria-current] { color: #fff; background: var(--szv-accent); }
.szv-admin-preview-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(138px, .75fr) minmax(0, 1.5fr) auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    margin: 0 0 16px;
    border: 1px solid var(--szv-line);
    border-radius: 6px;
    background: var(--szv-surface);
}
.szv-preview-field { min-width: 0; }
.szv-preview-field label { display: block; margin-bottom: 4px; color: var(--szv-muted); font-weight: 600; }
.szv-preview-field input[type="search"], .szv-preview-field input[type="date"], .szv-preview-field select {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 36px;
    margin: 0;
}
.szv-admin-preview-filters .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
}
.szv-calendar-workspace .szv-grid {
    border-color: var(--szv-line);
    border-radius: 6px;
    background: var(--szv-surface);
}
.szv-calendar-workspace .szv-weekday {
    padding: 8px;
    background: var(--szv-subtle);
    color: var(--szv-muted);
    font-size: 12px;
}
.szv-calendar-workspace .szv-day, .szv-calendar-workspace .szv-empty-day {
    box-sizing: border-box;
    min-height: 76px;
    padding: 7px;
    border-color: var(--szv-line);
}
.szv-calendar-workspace .szv-grid > :nth-child(7n) { border-right: 0; }
.szv-calendar-workspace .szv-empty-day { background: var(--szv-subtle); }
.szv-calendar-workspace .szv-day-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    min-height: 26px;
    border-radius: 50%;
    color: var(--szv-ink);
    text-decoration: none;
}
.szv-calendar-workspace .szv-day-link:hover { background: var(--szv-subtle); }
.szv-calendar-workspace .szv-day-today { background: #fff8f8; }
.szv-calendar-workspace .szv-day-today .szv-day-link { color: #fff; background: var(--szv-accent); }
.szv-calendar-workspace .szv-day-caption { display: none; }
.szv-calendar-workspace .szv-month-event {
    margin: 4px 0 0;
    padding: 4px 6px;
    border-left: 2px solid var(--szv-accent);
    border-radius: 3px;
    background: #f7f5f5;
    color: var(--szv-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}
.szv-calendar-workspace .szv-month-event:hover { background: #f8e7e9; text-decoration: underline; }
.szv-month-event-time { display: block; color: var(--szv-muted); font-size: 11px; font-weight: 500; }
.szv-calendar-workspace .szv-day-more { display: inline-block; margin-top: 5px; font-size: 12px; font-weight: 600; }
.szv-calendar-workspace .szv-event-list { border-top: 1px solid var(--szv-line); }
.szv-calendar-workspace .szv-event-time { margin-bottom: 3px; color: var(--szv-muted); font-size: 13px; }
.szv-calendar-workspace .szv-event h3 { font-size: 16px; line-height: 1.4; }
.szv-calendar-workspace .szv-event h3 a { color: var(--szv-ink); text-decoration: none; }
.szv-calendar-workspace .szv-event h3 a:hover { color: var(--szv-accent); text-decoration: underline; }
.szv-calendar-workspace .szv-event-image { border-radius: 6px; background: #e8eaed; }
.szv-calendar-workspace .szv-event-image img { border-radius: inherit; }
.szv-preview-detail { max-width: 720px; overflow-wrap: anywhere; }
.szv-preview-detail img { max-width: 100%; height: auto; }
@container szv-preview (max-width: 729px) {
    .szv-calendar-workspace .szv-grid { grid-template-columns: minmax(0, 1fr); }
    .szv-calendar-workspace .szv-weekday, .szv-calendar-workspace .szv-empty-day,
    .szv-calendar-workspace .szv-day:not(:has(.szv-month-event)) { display: none; }
    .szv-calendar-workspace .szv-grid:not(:has(.szv-month-event)) { display: none; }
    .szv-calendar-workspace .szv-day { min-height: 0; padding: 9px; border-right: 0; }
    .szv-calendar-workspace .szv-day:nth-child(1 of .szv-day:has(.szv-month-event)) { border-top: 0; }
    .szv-calendar-workspace .szv-day-number { display: none; }
    .szv-calendar-workspace .szv-day-caption { display: inline; }
    .szv-calendar-workspace .szv-day-link { padding: 0 6px; border-radius: 4px; }
    .szv-calendar-workspace .szv-month-event { padding: 6px 8px; font-size: 13px; }
    .szv-calendar-workspace .szv-event-image { flex-basis: 72px; height: 72px; }
}
@container szv-preview (max-width: 479px) {
    .szv-admin-preview-filters { grid-template-columns: minmax(0, 1fr) auto; }
    .szv-preview-field:nth-of-type(-n+2) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .szv-grid { grid-template-columns: 1fr; }
    .szv-weekday, .szv-empty-day, .szv-day:not(:has(.szv-month-event)) { display: none; }
    .szv-day { min-height: 0; }
    .szv-day:first-of-type { border-top: 0; }
    .szv-controls form { margin: 0; }
    .szv-event { gap: 12px; }
    .szv-event-image { flex-basis: 72px; height: 72px; }
}
