
h1,
h2,
h3 {
    line-height: 1.2em;
}

p {
    margin-top: 0em;
    margin-bottom: 0em;
}
body {
    margin: 0;
    padding: 0;
}

#page {
    display: grid;
    grid-template-areas:
        "header"
        "content"
        "footer";
    grid-template-rows: min-content 1fr auto;
    grid-template-columns: 1fr;
    grid-gap: 0px;
    /* width: 1200px; */
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

#header {
    grid-area: header;
    background: #f0f0f0;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

#content {
    grid-area: content;
    /* background: #f0f0f0; */
    /* padding: 20px; */
    overflow-y: auto;
}

#main {
    /* background: #f0f0f0; */
    padding: 20px;
    position: relative;
    /* overflow-y: auto; */
    
    margin: 0px auto;
    max-width: 650px;
    line-height: 1.4em;
    font-size: 18px;
    /* color: #444; */
    /* padding: 0 10px; */
}

#footer {
    grid-area: footer;
    background: #f0f0f0;
    padding: 5px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book {
    margin-bottom: 10px;
    padding: 1px;
}

.book:nth-child(even) {
    background-color: #ddd;
}
.book:nth-child(odd) {
    background-color: #fdfdfd;
}

.book-lang,
.book-genres,
.book-authors,
.book-translators,
.book-sequences,
.book-publisher,
.book-filetype {
    font-size: small;
    color: #aaa;
}

.book-genre:not(:last-child):after,
.book-author:not(:last-child):after,
.book-translator:not(:last-child):after,
.book-sequence:not(:last-child):after {
    content: ",";
}

.text-pages {
    color: #aaa;
}

.num-books {
    font-size: small;
    color: #aaa;
}

.filetype {
    font-size: small;
    color: #000000;
}

.author:nth-child(even) {
    background-color: #ddd;
}

.sequence:nth-child(even) {
    background-color: #ddd;
}

.genre {
    margin-left: 20px;
}

.publisher-year {
    font-size: small;
    color: #000000;
}

.book-link {
    font-size: small;
}

.book-title > span {
    margin-right: 5px;
}

.book-title-filetype {
    background-color: gray;
    color: white;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 10rem;
    border-width: 1px;
    border-style: solid;
    padding: 0px 5px;
    font-size: small;
}

.book-title-filetype-fb2 {
    background-color: #c3e6cd;
    color: #24663b;
}

.book-title-lang {
    background-color: gray;
    color: white;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 10rem;
    border-width: 1px;
    border-style: solid;
    padding: 0px 5px;
    font-size: small;
}

.book-title-lang-ru {
    background-color: #c3e6cd;
    color: #24663b;
}

.annotation > img {
    max-width: 250px;
    max-height: 300px;
    float: left;
    margin: 10px;
}

.book-buttons > span {
    margin-right: 5px;
}
.book-buttons > div > a {
    margin-right: 5px;
}
.buttons {
    float: right;
}

/* Buttons */
.btn {
    transition: none;
    border-radius: 4px;
    border: 1px solid;
    display: inline-block;
    padding: 8px 16px;
    vertical-align: middle;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background-color: #8f8f8f2a;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    min-width: 100px;
}

.btn:hover {
    color: #fefefe;
    text-decoration: none;
    background-color: #ccc !important;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn:disabled {
    opacity: 0.65;
}

.dict {
    position: sticky;
    top: 0;
    background-color: var(--n-color); /* Цвет фона карточки */
    z-index: 11; /* Выше, чем у filter-row */
    border-bottom: 1px solid var(--n-border-color); /* Опционально, для визуального разделения */
    padding-top: 8px; /* Компенсация для border */
    padding-bottom: 8px; /* Компенсация для border */
}

.up-panel {
    /* Если нужно, чтобы была всегда видна при скролле */
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--n-border-color); /* Опционально, для визуального разделения */
    background-color: var(--n-color); /* Цвет фона карточки */
    /* background-color: white; */
    z-index: 10;
    padding: 8px 0;
}