body {
    max-width: 1200px;
    margin: auto;
    font-family: sans-serif;
    background: #f5f5f5;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

/*/////////////////////
曜日枠と文字色
////////////////////// */
.shift {
    color: #fff;
    border-radius: 8px;
    padding: 4px 6px;
    margin-top: 4px;
    font-size: .85rem;
    line-height: 1.4;
}

.day {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    min-height: 140px;
    max-height: 140px;
    overflow-y: auto;
    padding: 8px;
    box-sizing: border-box;
    transition: .2s;
}

.day:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.empty {
    background: transparent;
    box-shadow: none;
}

.date {
    font-weight: bold;
    margin-bottom: 5px;
    color: #222 !important;
}

.shift {
    background: #4f8cff;
    color: #fff;
    border-radius: 5px;
    padding: 4px;
    margin-bottom: 4px;
    font-size: 12px;
}

.today {
    border: 2px solid #53ff4d;
}

.today .date {
    color: #c42ba2;
}

.title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.title a {
    text-decoration: none;
    font-size: 1.4rem;
    color: #555;
}

.title a:hover {
    opacity: 0.7;
}

.sunday {
    color: #ff4d4d !important;
}

.saturday {
    color: #4f8cff !important;
}


/* モーダル */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);

    display: none;

    justify-content: center;
    align-items: center;

    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

#closeModal {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
}


/*///////////////////////
タップビュー 
////////////////////// */

#viewModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 9999;
    color:#000;
}

#viewModal .modal-content {
    color:#000;
    max-width: 500px;
    width: 90%;
    margin: 80px auto;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#closeViewModal {
    align-self: flex-end;
    cursor: pointer;
}

#viewModalContent {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#viewModalContent .shift {
    display: block;
    padding: 10px 14px;
    margin-bottom: 10px;
}

#viewModalDate {
    color: #000;
    margin: 0 0 15px;
    text-align: center;
}



@media (max-width: 768px) {

    .calendar {
        font-size: 12px;
    }

    .day {
        min-height: 90px;
        max-height: 100px;
        padding: 4px;

    }

    .date {
        font-size: 14px;
    }

    .shift {
        font-size: 10px;
        padding: 2px;
    }

    .modal-content {
        width: 95%;
    }

}