.timeline-canvas {
    position: relative;
}

.timeline-empty-cell {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    font: inherit;
    cursor: cell;
    touch-action: manipulation;
    transition: background-color .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.timeline-empty-cell.hour-mark {
    border-left: 1px solid #cddfd6;
}

.timeline-empty-cell:hover,
.timeline-empty-cell:focus-visible {
    outline: none;
    background: #eefaf4;
    box-shadow: inset 0 0 0 2px rgba(8, 169, 101, .18);
}

.timeline-empty-cell:active {
    background: #def5e9;
}

.timeline-empty-cell.past,
.timeline-empty-cell:disabled {
    cursor: not-allowed;
    opacity: .78;
    background-color: #f4f6f5;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(122, 139, 130, .12) 0,
        rgba(122, 139, 130, .12) 7px,
        rgba(255, 255, 255, .46) 7px,
        rgba(255, 255, 255, .46) 13px
    );
    box-shadow: none;
}

.timeline-empty-cell.past:hover,
.timeline-empty-cell.past:focus-visible,
.timeline-empty-cell:disabled:hover,
.timeline-empty-cell:disabled:focus-visible,
.timeline-empty-cell:disabled:active {
    background-color: #f4f6f5;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(122, 139, 130, .12) 0,
        rgba(122, 139, 130, .12) 7px,
        rgba(255, 255, 255, .46) 7px,
        rgba(255, 255, 255, .46) 13px
    );
    box-shadow: none;
}

.timeline-now-line {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 9;
    width: 2px;
    pointer-events: none;
    background: #ef3f3a;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .76), 0 0 8px rgba(226, 49, 44, .18);
}

.timeline-now-line::after {
    content: '';
    position: absolute;
    top: 42px;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ef3f3a;
    box-shadow: 0 1px 5px rgba(122, 18, 15, .28);
}

.timeline-now-label {
    position: sticky;
    top: 3px;
    display: inline-flex;
    align-items: center;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    padding: 3px 7px;
    background: #ef3f3a;
    color: #fff;
    font-size: .6rem;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 3px 9px rgba(126, 22, 18, .28);
}

.timeline-now-line.near-start .timeline-now-label {
    transform: translateX(-14%);
}

.timeline-booking strong {
    font-size: .84rem;
    line-height: 1.15;
}

.timeline-booking small {
    font-size: .64rem;
}

@media (max-width: 600px) {
    .schedule-filter-grid {
        gap: 9px;
        padding: 10px;
    }

    .schedule-filter-control select,
    .schedule-filter-control input,
    .filter-static,
    .date-nav,
    .today-button {
        min-height: 50px;
        border-radius: 13px;
        font-size: .84rem;
    }

    .schedule-filter-control > span {
        font-size: .64rem;
    }

    .schedule-day-nav {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
    }

    .timeline-header-row,
    .timeline-court-row {
        --court-column: 84px;
    }

    .timeline-court-label {
        padding: 6px;
    }

    .timeline-court-label strong {
        font-size: .78rem;
    }

    .timeline-court-label small {
        font-size: .61rem;
    }

    .timeline-booking {
        padding-top: 18px;
    }

    .timeline-booking strong {
        font-size: .78rem;
    }

    .timeline-booking-phone {
        display: none;
    }

    .timeline-now-label {
        font-size: .58rem;
        padding: 3px 6px;
    }

    .booking-inspector {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: calc(112px + env(safe-area-inset-bottom));
        z-index: 35;
        max-height: min(58vh, 520px);
        overflow: auto;
        border-radius: 22px 22px 16px 16px;
        box-shadow: 0 18px 50px rgba(15, 48, 31, .28);
        animation: schedule-sheet-in .18s ease-out;
    }

    .booking-inspector-heading {
        position: sticky;
        top: -14px;
        z-index: 2;
        margin: -14px -14px 0;
        padding: 14px;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(10px);
    }

    .booking-inspector-actions {
        position: sticky;
        bottom: -14px;
        margin: 0 -14px -14px;
        padding: 10px 14px 14px;
        background: rgba(255, 255, 255, .97);
        backdrop-filter: blur(10px);
    }

    .booking-inspector-actions .button {
        min-height: 44px;
    }
}

@keyframes schedule-sheet-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
