.duty-calendar {
    width: 100%;
}

.duty-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

.duty-nav-btn,
.duty-today-btn {
    min-height: 38px;
    border: 1px solid #d9dde3;
    background: #fff;
    color: #222;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
    word-break: keep-all;
}

.duty-nav-btn {
    width: 38px;
    font-size: 24px;
    line-height: 1;
}

.duty-today-btn {
    padding: 0 16px;
    font-size: 14px;
}

.duty-nav-btn:hover,
.duty-today-btn:hover {
    border-color: #9ea7b3;
}

.duty-month-label {
    min-width: 130px;
    text-align: center;
    font-size: 20px;
    color: #222;
    font-weight: 700;
}

.duty-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-bottom: 18px;
    color: #555;
    font-size: 14px;
}

.duty-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.duty-weekdays,
.duty-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.duty-weekdays {
    border-top: 1px solid #333;
    border-bottom: 1px solid #d9dde3;
    background: #fafafa;
}

.duty-weekdays span {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #333;
    font-weight: 700;
}

.duty-weekdays .sun,
.duty-day.sun .duty-day-num {
    color: #d85151;
}

.duty-weekdays .sat,
.duty-day.sat .duty-day-num {
    color: #516fd8;
}

.duty-days {
    border-left: 1px solid #e5e8eb;
}

.duty-day {
    min-height: 136px;
    border-right: 1px solid #e5e8eb;
    border-bottom: 1px solid #e5e8eb;
    padding: 10px;
    background: #fff;
}

.duty-day.today {
    background: #fff8f8;
}

.duty-day-blank {
    background: #f8f9fb;
}

.duty-day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #333;
    font-size: 15px;
    font-weight: 700;
}

.duty-day.today .duty-day-num {
    border-radius: 50%;
    background: #ff5754;
    color: #fff;
}

.duty-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
}

.duty-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #f6f7f9;
    color: #222;
    font-size: 13px;
    line-height: 1.25;
}

.duty-badge b {
    flex: 0 0 auto;
    color: #fff;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.duty-badge em {
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-dot.duty-ob-main,
.duty-badge.duty-ob-main b {
    background: #d75d74;
}

.legend-dot.duty-ob-sub,
.duty-badge.duty-ob-sub b {
    background: #8d79d6;
}

.legend-dot.duty-pd-main,
.duty-badge.duty-pd-main b {
    background: #4f7fc7;
}

.legend-dot.duty-pd-sub,
.duty-badge.duty-pd-sub b {
    background: #55956a;
}

.duty-empty {
    margin-top: 26px;
}

@media (max-width: 768px) {
    .duty-calendar-nav {
        gap: 8px;
    }

    .duty-month-label {
        min-width: 104px;
        font-size: 17px;
    }

    .duty-legend {
        justify-content: flex-start;
        font-size: 13px;
    }

    .duty-weekdays span {
        min-height: 38px;
        font-size: 13px;
    }

    .duty-day {
        min-height: 104px;
        padding: 6px 4px;
    }

    .duty-day-num {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .duty-badge {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        padding: 4px;
        font-size: 12px;
    }

    .duty-badge b {
        font-size: 11px;
        padding: 2px 4px;
    }

    .duty-badge em {
        width: 100%;
    }
}
