.mbw-timetable {
    display: grid;
    gap: 24px;
    font-family: inherit;
    color: var(--mbw-tt-primary-text, #222222);
}

.mbw-timetable.mbw-tt-columns-1 { grid-template-columns: 1fr; }
.mbw-timetable.mbw-tt-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mbw-timetable.mbw-tt-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mbw-timetable.mbw-tt-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mbw-tt-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 12px;
    background: var(--mbw-tt-card-bg, #ffffff);
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

.mbw-tt-card__header {
    padding: 22px 22px 16px;
}

.mbw-tt-card__name {
    margin: 0 0 6px;
    padding: 0;
    color: var(--mbw-tt-primary-text, #222222);
    font-family: inherit;
    font-size: 19px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
}

.mbw-tt-card__role {
    margin: 0;
    color: var(--mbw-tt-secondary-text, #666666);
    font-family: inherit;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: none;
}

.mbw-tt-card__attendance {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 11px 22px;
    color: var(--mbw-tt-attendance-text, #222222);
    background: var(--mbw-tt-attendance-bg, #f5f5f5);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.45;
}

.mbw-tt-card__attendance strong {
    color: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
}

.mbw-tt-card__eyebrow {
    color: inherit;
    font-family: inherit;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.70;
}

.mbw-tt-card__schedule {
    padding: 10px 22px 16px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.45;
}

.mbw-tt-card__slot {
    display: grid;
    grid-template-columns: minmax(95px, 0.9fr) minmax(0, 1.1fr);
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.mbw-tt-card__slot:last-child {
    border-bottom: 0;
}

.mbw-tt-card__day {
    color: var(--mbw-tt-primary-text, #222222);
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
}

.mbw-tt-card__time {
    color: var(--mbw-tt-secondary-text, #666666);
    font-size: inherit;
    font-weight: 400;
    line-height: inherit;
    text-align: right;
}

.mbw-tt-empty {
    padding: 14px 16px;
    border: 1px dashed rgba(0, 0, 0, 0.25);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
}

/* Tablet: never exceed two cards per row. A one-column desktop layout remains one column. */
@media (max-width: 1024px) {
    .mbw-timetable.mbw-tt-columns-3,
    .mbw-timetable.mbw-tt-columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phone: always one card per row. */
@media (max-width: 767px) {
    .mbw-timetable,
    .mbw-timetable.mbw-tt-columns-2,
    .mbw-timetable.mbw-tt-columns-3,
    .mbw-timetable.mbw-tt-columns-4 {
        grid-template-columns: 1fr;
    }

    .mbw-tt-card__slot {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .mbw-tt-card__time {
        text-align: left;
    }
}
