body {
    font-family: "Times New Roman", Times, serif;
    color: black;
    background-color: white;
}

.centred {
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.title {
    font-weight: bold;
}

#library {
    max-width: 40em;
    margin: auto;
}

#header {
    text-align: center;
}

#stats table {
    margin: auto;
}

#stats th,
#stats td {
    padding: 0.2em 0.75em;
}

#books {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6em;
}

/* one per row on phones, with slightly bigger text (and covers, which are sized in em).
   in px so text size settings don't move it */
@media (max-width: 640px) {
    body {
        font-size: 18px;
    }

    #books {
        grid-template-columns: 1fr;
    }
}

.book {
    display: flex;
    gap: 0.75em;
    background-color: whitesmoke;
    padding: 0.5em;
}

.info {
    min-width: 0;
    overflow-wrap: break-word;
}

.cover {
    flex: none;
    width: 6em;
    aspect-ratio: 2 / 3;
    border: 1px solid black;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[hidden] {
    display: none !important;
}

/* vertically centred like .centred, but can grow past the screen height and scroll */
#picker {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 16px);
    max-width: 40em;
    margin: auto;
    text-align: center;
}

#covers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

#covers button {
    padding: 0;
    border: 1px solid black;
    background: none;
    cursor: pointer;
}

#covers img {
    display: block;
    width: 6em;
}
