*,
*:before,
*:after {
    box-sizing: border-box;
    font-family: Monaco, 'Courier New', Courier, monospace;
}

body {
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    padding: 40px 20px;
    margin: 0;
    font-size: 16px;
}

.title-box {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 20px;
}

#lived {
    color: #34d399;
}

.unit-selector {
    position: relative;
    display: inline-block;
}

.unit-display {
    cursor: pointer;
    user-select: none;
}

.selected {
    color: #34d399;
}

.unit-options {
    position: absolute;
    left: 0;
    background-color: #000000;
    border: 1px solid #ffffff;
    margin-top: 10px;
    z-index: 100;
    text-align: left;
    min-width: 150px;
}

.hidden {
    display: none;
}

.unit-option {
    padding: 10px 20px;
    cursor: pointer;
    color: #ffffff;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.unit-option:hover {
    background-color: #1a1a1a;
}

.unit-option.active {
    color: #34d399;
}

#birthday-msg {
    text-align: center;
    margin-bottom: 30px;
    color: #34d399;
    font-size: 1rem;
}

.chart {
    margin: 0 auto;
    padding: 0;
    list-style-type: none;
}

.chart > li {
    aspect-ratio: 1;
    background-color: transparent;
    border: 1px solid #9ca3af;
}

.chart > li.done {
    background-color: #34d399;
    border: none;
}

.years {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    max-width: 600px;
}

.months {
    display: grid;
    grid-template-columns: repeat(36, 1fr);
    gap: 2px;
    max-width: 600px;
}

.weeks {
    display: grid;
    grid-template-columns: repeat(52, 1fr);
    gap: 1px;
    max-width: 600px;
}

.weeks > li:nth-child(4n):not(:nth-child(52n)) {
    margin-right: 1px;
}

.weeks > li.row-gap {
    margin-bottom: 1px;
}

@media (max-width: 850px) {
    .weeks {
        max-width: 95vw;
    }
}

@media (max-width: 350px) {
    .months {
        max-width: 95vw;
    }
}

@media (max-width: 550px) {
    .years {
        max-width: 95vw;
    }

    .title {
        font-size: 1.5rem;
    }
}
