.year-calendar {
    display: flex;
    flex-wrap: wrap;
}

.year-calendar>div {
    margin: 0 .5% 15px;
    padding: 25px 15px 15px;
    width: 24%;
    background-color: #fff;
    border-radius: 12px;
}

.year-calendar>div h3 {
    text-align: center;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: bolder;
    color: #222;
}

.year-calendar>div table {
    margin: 0;
}

.year-calendar>div table th,
.year-calendar>div table td {
    margin: 0;
    padding: 2px;
    font-size: 11px;
    text-align: center;
    border: 0;
    font-weight: bold;
    color: #222;
    width: 14.2857%
}

.year-calendar>div table th span,
.year-calendar>div table td span {
    margin: 0;
    padding: 0;
    display: flex;
    border-radius: 100%;
    justify-content: center;
    aspect-ratio: 1/1;
    align-items: center;
}

.year-calendar>div table th:first-child,
.year-calendar>div table td:first-child {
    color: #eaa050;
}

.year-calendar .bangkok span {
    color: #fff;
    background-color: #8E5917;
    border: 2px solid #8E5917;
}

.year-calendar .phuket span {
    background-color: #FFD41D;
    border: 2px solid #FFD41D;
}

.year-calendar .khonkaen span {
    color: #fff;
    background-color: #F7703C;
    border: 2px solid #F7703C;
}

.year-calendar .bangkok_m span {
    color: #8E5917;
    border: 2px solid #8E5917;
}

.year-calendar .phuket_m span {
    border: 2px solid #FFD41D;
}

.year-calendar .khonkaen_m span {
    color: #F7703C;
    border: 2px solid #F7703C;
}

@media screen and (max-width: 430px) {
    .year-calendar>div {
        margin-bottom: 5px;
        width: 100%;
    }
}

.year-calendar__legend {
    margin: 0 6px;
    padding: 20px;
    display: flex;
    background-color: #fff;
    justify-content: center;
    border-radius: 12px;
}

.year-calendar__legend p {
    margin: 0 20px;
}

.dark .year-calendar__legend p {
    color: #222;
}

.dark .year-calendar__legend p b {
    color: #000;
}

.year-calendar__legend p:nth-child(1) span:nth-child(2),
.year-calendar__legend p:nth-child(1) span:nth-child(3),
.year-calendar__legend p:nth-child(1) span:nth-child(4),
.year-calendar__legend p:nth-child(2) span:nth-child(2),
.year-calendar__legend p:nth-child(2) span:nth-child(3),
.year-calendar__legend p:nth-child(2) span:nth-child(4) {
    margin: 0 0 0 15px;
    padding: 0 0 0 20px;
    position: relative;
}

.year-calendar__legend p:nth-child(1) span:nth-child(2):before,
.year-calendar__legend p:nth-child(1) span:nth-child(3):before,
.year-calendar__legend p:nth-child(1) span:nth-child(4):before,
.year-calendar__legend p:nth-child(2) span:nth-child(2):before,
.year-calendar__legend p:nth-child(2) span:nth-child(3):before,
.year-calendar__legend p:nth-child(2) span:nth-child(4):before {
    content: '';
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 100%;
    position: absolute;
    top: 3px;
    left: 0;
}

.year-calendar__legend p:nth-child(1) span:nth-child(2):before {
    background-color: #8E5917;
}

.year-calendar__legend p:nth-child(1) span:nth-child(3):before {
    background-color: #FFD41D;
}

.year-calendar__legend p:nth-child(1) span:nth-child(4):before {
    background-color: #F7703C;
}

.year-calendar__legend p:nth-child(2) span:nth-child(2):before {
    border: 2px solid #8E5917;
}

.year-calendar__legend p:nth-child(2) span:nth-child(3):before {
    border: 2px solid #FFD41D;
}

.year-calendar__legend p:nth-child(2) span:nth-child(4):before {
    border: 2px solid #F7703C;
}


@media screen and (max-width: 430px) {
    .year-calendar__legend {
        flex-direction: column;
    }

    .year-calendar__legend p {
        margin: 0 0 20px;
    }

    .year-calendar__legend p b {
        padding: 0 0 5px;
        display: block;
    }

    .year-calendar__legend p span {
        padding: 0;
        margin: 0 10px 0 0 !important;
        display: inline-block;
        font-size: 14px;
    }
}