.planner {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.planner-header {
    display: grid;
    grid-template-columns: repeat(var(--day-count, 7), 1fr);
    background: #f0f2f7;
    border-bottom: 1px solid #e0e3ec;
}

.planner-header__day {
    padding: 10px 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    border-right: 1px solid #e0e3ec;
}
.planner-header__day:last-child { border-right: none; }

.planner-header__day--today {
    background: #4a6e32;
    color: white;
}

.planner-body {
    position: relative;
    min-height: 320px;
}

/* invisible column grid – just for the vertical lines */
.planner-columns {
    display: grid;
    grid-template-columns: repeat(var(--day-count, 7), 1fr);
    height: 100%;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.planner-column {
    border-right: 1px solid #e0e3ec;
}
.planner-column:last-child { border-right: none; }

.planner-rows {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}

.planner-row {
    display: grid;
    grid-template-columns: repeat(var(--day-count, 4), 1fr);
}

.planner-block {
    /* grid-column is set inline */
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    cursor: pointer;
    transition: filter .15s, transform .15s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 100px;
}
.planner-block:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.planner-block__title {
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.planner-block__dates { font-size: 11px; opacity: .8; }

.planner-block--color-0 { background: #eab308; }
.planner-block--color-1 { background: #8199c5; }
.planner-block--color-2 { background: #8c2a8c; }
.planner-block--color-3 { background: #1c9b4a; }
.planner-block--color-4 { background: #dc2626; }
.planner-block--color-5 { background: #0ea5e9; }
