html {
    color: #111111;
    background: #ffffff;
}
html,
body,
#container {
    height: 100%;
}
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a {
    margin: 0px;
    padding: 0px;
}
img {
    border: none;
}
p {
    font-family: Verdana, sans-serif;
}
a {
    text-decoration: none;
    color: #003aac;
}
a:hover {
    text-decoration: none;
    color: #d70a0a;
}
h1 {
    font: 10px Verdana, sans-serif;
    margin: 0px;
    padding-left: 5px;
    text-align: left;
    color: #fc0;
    width: 960px;
}
h1 a {
    text-decoration: none;
    color: #fc0;
}
h1 a:hover {
    text-decoration: none;
    color: #fc0;
}
#container {
    min-width: 1100px;
    max-width: 1920px;
    margin: 0px auto;
    background-image: url('../img/background_tracery.jpg');
}
#main {
    min-height: 100%;
    margin-bottom: -60px;
    background-image: url('../img/background_tracery.jpg');
}
#all {
    padding-bottom: 60px;
    overflow: hidden;
}
/******************** Стилі content *********************/
#out {
    display: grid;
    grid-template-columns: 200px minmax(700px, 1fr) 200px;
    grid-template-rows: auto;
    width: 100%;
    min-width: 1100px;
    gap: 0;
    align-items: start;
    overflow-x: auto;
}
#out > #left-block {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 200px;
    max-width: 200px;
}
#out > #content {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0;
    max-width: 100%;
    padding: 5px;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
#out > #right-block {
    grid-column: 3 !important;
    grid-row: 1 !important;
    min-width: 200px;
    max-width: 200px;
}
#left-block,
#right-block {
    overflow-wrap: anywhere;
    word-break: break-word;
    width: 200px;
    background: #ffffff;
    border-radius: 8px;
    margin-top: 5px;
}
/***************** Кінець стилів content *****************/
.floral_divider {
    text-align: center;
}
.book-cover {
    float: left;
    max-width: 200px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
/******** Стилі кришки (Навігація, Вхід тощо) ********/
.capUnit {
    background-image: url('../img/navbg.jpg');
    background-repeat: repeat-x;
    height: 30px;
    border: 2px solid #b48c64;
    border-radius: 8px;
    text-align: center;
    color: #333333;
    font: 900 15px 'Time New Roman', serif;
}
.capUnit div {
    margin-top: 5px;
}
#capUnit:hover {
    border: 2px solid #f7820d;
}
#capUnit a {
    display: inline-block;
    width: 100%;
    color: #333333;
}
#capUnit a:hover {
    color: #000000;
}
/****************** Кінець стилів кришки *****************/

/********************* Стилі кнопки *********************/
.formButton {
    font: 900 11px Verdana, sans-serif;
    color: #fff;
    background-color: #457ab0;
    text-transform: uppercase;
    height: 27px;
    width: 130px;
    border: 2px solid #ccc;
    border-radius: 6px;
}
.formButton:hover {
    border-color: #f1ca7f;
    cursor: pointer;
    background: #79b5fc;
}
/****************** Кінець стилів кнопки *****************/

/********************* Стилі header *********************/
#header {
    background-image: url('../img/header_fence.webp');
    background-repeat: repeat-x;
    background-size: auto 100%;
    background-position: left center;
    overflow: hidden;
    text-align: center;
}
#header div {
    width: 1000px;
    height: 216px;
    margin: 0px auto;
}
.alphabet-navigation {
    border: 2px solid #b48c64;
    border-radius: 8px;
    text-align: center;
    overflow: hidden;
}
.authors-by-letter,
.books-by-letter {
    font: 600 16px Time New Roman, serif;
    text-align: center;
    padding: 2px;
}
.authors-by-letter {
    background: #7a3b05;
    color: #ede66b;
}
.authors-by-letter a {
    color: #ede66b;
}
.authors-by-letter a:hover,
.books-by-letter a:hover {
    color: #000;
    background-color: #7f7f9c;
}
.books-by-letter {
    background: #ede66b;
    color: #7a3b05;
}
.books-by-letter a {
    color: #7a3b05;
}
.books-list {
    counter-reset: booknum;
    list-style: none;
    margin: 0;
    padding: 0;
}
.books-grid-row {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 2em;
    margin-bottom: 0.5em;
    position: relative;
    padding-left: 2.8em;
}

.books-grid-row::before {
    counter-increment: booknum;
    content: counter(booknum) '. ';
    position: absolute;
    left: 0;
    top: 0;
    min-width: 2em;
    text-align: right;
}
.author-list {
    text-align: left;
    margin-bottom: 0.5em;
    margin-left: 0.5em;
    padding-left: 0.2em;
}
/****************** Кінець стилів header *****************/

/******************** Стилі left-block *******************/
ul.leftMenu {
    list-style-type: none;
    padding: 0px;
    margin: 3px;
    border: solid 0px #808080;
    border-bottom-width: 1px;
    width: 194px;
}
ul.leftMenu li {
    margin: 0px;
    padding: 0px;
    border: solid 1px #808080;
    border-bottom-width: 0px;
    line-height: 0;
}
ul.leftMenu a {
    display: block;
    text-decoration: none;
    color: #111111;
    background-color: #f6f6f6;
    font: 900 13px Georgia, Verdana, sans-serif;
    padding: 8px 5px;
    cursor: pointer;
}
ul.leftMenu a:hover {
    color: #d70a0a;
    background-color: #ffff99;
}
ul.leftMenu li {
    position: relative;
}
ul.leftMenu li ul {
    display: none;
    margin: 0px;
    padding: 0px;
    position: absolute;
    left: 100%;
    top: 0px;
    list-style-type: none;
    width: 240px;
}
ul.leftMenu li:hover ul {
    display: block;
}
ul.leftMenu li ul.g1 {
    top: -200px;
}
ul.leftMenu li ul li a {
    background-color: #252525;
    border: 1px solid #252525;
    color: #eeeeee;
    padding-left: 5px;
    font: 400 13px Arial, sans-serif;
}
ul.leftMenu li ul li a:hover {
    background-color: #f6f6f6;
    color: #0051e7;
    font-weight: bold;
}
/***************** Кінець стилів left-block ***************/

/******************** Стилі right-block ******************/
#enterSite {
    text-align: center;
    font: 12px Verdana, sans-serif;
    padding-top: 10px;
}
#enterSite a {
    font-size: 11px;
}
#enterSite label {
    display: block;
    margin-top: 8px;
}
#enterSite input.formButton {
    margin: 5px 0px;
}
#login,
#password,
#search {
    width: 150px;
    border: 3px #f1ca7f double;
    border-radius: 4px;
    background-color: #fdffe2;
    font: 12px Verdana, sans-serif;
}
#remember {
    vertical-align: middle;
}

#userSession {
    font: 13px Verdana, sans-serif;
    color: #43637e;
}
#userSession span {
    font-weight: bold;
}
#userSession span.pointsUser {
    color: green;
}
#userSession a {
    font-size: 14px;
}
#userSession ul {
    list-style-type: none;
    margin: 10px;
    padding: 0px;
}
#userSession li {
    margin: 6px;
}
#userSession .avatarUser {
    text-align: center;
    margin: 10px;
}
.user-avatar-right {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
}
.user-avatar-comment {
    max-width: 100px;
    height: auto;
    border-radius: 5px;
}
#searchSite {
    text-align: center;
    font: 12px Verdana, sans-serif;
}
#searchSite label {
    display: block;
}
#searchSite img {
    padding-top: 10px;
}
#searchSite .checkboxSearch {
    text-align: left;
    margin-bottom: 5px;
}
#searchSite .checkboxSearch label {
    padding-left: 18px;
}
#searchSite .checkboxSearch input {
    padding: 0px;
    margin: 3px 0px 0px 0px;
}
#searchSite input.formButton {
    margin: 10px 0px;
}
/***************** Кінець стилів right-block **************/

/********************* Стилі footer *********************/
#footer {
    background-image: url('../img/footer_fon.jpg');
    background-repeat: repeat-x;
    overflow: hidden;
    height: 60px;
    margin: 0px auto;
    text-align: center;
    border-radius: 10px 10px 0px 0px;
}
#footer p {
    width: 800px;
    height: 40px;
    background-image: url('../img/footer-books-412x160.png');
    background-repeat: no-repeat;
    background-size: 103px 40px;
    background-position: left center;
    margin: 10px auto;
    padding-left: 115px;
    text-align: left;
    font-size: 10px;
    line-height: 1.5em;
    color: #7f7f9c;
}
#header div {
    width: 1000px;
    height: 216px;
    margin: 0px auto;
}
#footer strong {
    font-weight: normal;
}
#footer a {
    color: #7f7f9c;
}
/****************** Кінець стилів footer *****************/

/******************** Стилі navigation ********************/
#main .navigation,
#main .navigation a,
#main .navigation a:hover {
    font: 14px 'Times New Roman', serif;
}
#main .navigation {
    text-align: center;
    margin-bottom: 20px;
}
#main .navigation a {
    text-decoration: none;
    color: #003aac;
    background: #ffffb3;
    border: 1px solid #666666;
    border-radius: 5px;
    padding: 3px 8px;
    margin: 0px 4px;
}
#main .navigation a:hover {
    background: #79b5fc;
    color: #ffffff;
}
#main .navigation span {
    text-decoration: none;
    background: #ffff99;
    padding: 3px 10px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    color: #6a6a6a;
}
#main .navigation span.current {
    border: 1px solid #666666;
    border-radius: 5px;
    font-weight: bold;
    background: #457ab0;
    color: #ffffff;
}
/***************** Кінець стилів navigation ****************/

/************** Стилі рейтингу **************/
.rating,
.rating a:hover,
.rating a:active,
.rating a:focus,
.rating .current-rating {
    background: url('../img/rating.gif') left -1000px repeat-x;
}
.rating {
    position: relative;
    width: 100px;
    height: 20px;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    background-position: left top;
}
.rating li {
    display: inline;
}
.rating a,
.rating .current-rating {
    position: absolute;
    top: 0;
    left: 0;
    text-indent: -1000em;
    height: 20px;
    line-height: 20px;
    outline: none;
    overflow: hidden;
    border: none;
}
.rating a:hover,
.rating a:active,
.rating a:focus {
    background-position: left bottom;
    cursor: pointer;
}
.rating a.one-star {
    width: 20%;
    z-index: 6;
}
.rating a.two-stars {
    width: 40%;
    z-index: 5;
}
.rating a.three-stars {
    width: 60%;
    z-index: 4;
}
.rating a.four-stars {
    width: 80%;
    z-index: 3;
}
.rating a.five-stars {
    width: 100%;
    z-index: 2;
}
.rating .current-rating {
    z-index: 1;
    background-position: left center;
}
.current-rating {
    width: 0%;
}
/************** Кінець стилів рейтингу **************/

/******************* Styles for reading book text ******************/
.reader-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    position: sticky;
    top: 0;
    padding: 8px 12px;
    background: #f7f9fc;
    border-bottom: 1px solid #e1e8f0;
    font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
.reader-toolbar button {
    min-width: 36px;
    height: 32px;
    border: 1px solid #c5d8f0;
    border-radius: 6px;
    background: #eef4ff;
    font-weight: 700;
    cursor: pointer;
}
#fsValue {
    font-size: 0.9rem;
    color: #555;
    min-width: 52px;
    text-align: center;
}
.book-content {
    font-size: 18px;
    line-height: 1.7;
}
.read-book-text a {
    text-decoration: none;
    color: #003aac;
}
.read-book-text a:hover {
    text-decoration: none;
    color: #d70a0a;
}
.read-book-text img.book-cover {
    margin: 10px 18px 10px 10px;
}
/******* epub 2.0 *******/
a.book-note {
    margin-left: 5px;
}
a.book-link {
    text-decoration: none;
    color: #c6d9f0;
}
a.book-link:hover {
    text-decoration: underline;
    color: #2a5d9f;
}

div.book-title {
    font-size: 26px;
    margin: 10px 0;
    text-align: center;
    color: #b3710e;
}
figure.book-image {
    max-width: 780px;
    margin: 16px auto;
    text-align: center;
}
img.book-illustration {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

p.book-title-line {
    font-family: Georgia, 'Times New Roman', 'PT Serif', 'Liberation Serif', 'DejaVu Serif', serif;
}
p.book-paragraph {
    text-align: justify;
}
div.book-cite {
    border-left: 4px solid #bebebe;
    padding-left: 1em;
}
p.book-subtitle {
    text-align: center;
    font-weight: bold;
}
p.book-empty-line {
    height: 1.2em;
}
/* --- Абзаци, текст яких форматувався через <em> <i> --- */
p.book-narrative {
    font-style: normal;
    border-left: 3px solid #bebebe;
    padding-left: 1em;
}
div.book-annotation {
    margin: 1.5em 0;
    padding: 0.8em 1em;
    color: #555;
    border-left: 3px solid #bebebe;
}
div.book-annotation em {
    font-style: normal;
    font-weight: 500;
}
/* --- Епіграф (з автором) --- */
div.book-epigraph {
    display: inline-block;
    max-width: 750px;
    min-width: 300px;
    margin: 1rem auto;
    padding: 1.5rem 2rem;
    background: #fdfcf9;
    border-left: 4px solid #bebebe;
    font-family: 'Georgia', 'Times New Roman', serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    position: relative;
    clear: both;
}
div.book-epigraph::before {
    content: '❝';
    font-size: 2rem;
    color: #bebebe;
    position: absolute;
    top: 0px;
    left: 10px;
}
div.book-epigraph div.book-poem {
    /* прибираємо дублювання рамки і фону */
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    margin-bottom: 1rem;
}
div.book-epigraph p.book-text-author {
    font-style: italic;
    text-align: right;
    color: #555;
    margin-top: 0.5rem;
}

/* --- Вірш (без автора) --- */
div.book-poem {
    display: inline-block;
    max-width: 750px;
    min-width: 300px;
    margin: 1rem auto;
    padding: 1.5rem 2rem;
    background: #fdfcf9;
    border-left: 4px solid #bebebe;
    font-family: 'Georgia', 'Times New Roman', serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    position: relative;
    clear: both;
}

/* --- Спільне оформлення строф і рядків --- */
div.book-stanza {
    margin-bottom: 1.2rem;
}
p.book-verse {
    margin: 0.3rem 0;
    text-indent: -1em;
    padding-left: 1em;
    color: #333;
    line-height: 1.6;
}

/* --- Виділення тексту тега code --- */
code.book-code {
    background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.022) 0 2px, rgba(0, 0, 0, 0) 2px 4px),
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.018) 0 3px, rgba(0, 0, 0, 0) 3px 6px),
        radial-gradient(100% 140% at 50% 20%, rgba(0, 0, 0, 0.06), transparent 60%),
        linear-gradient(180deg, #fbf2dd 0%, #f0e1c4 100%);
    background-blend-mode: multiply, multiply, normal, normal;
    border: 2px solid #e0cfaa;
    border-radius: 6px;
    padding: 3px 6px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #2a2217;
}

ul.book-chapters {
    font-family: 'Times New Roman', Times, serif;
    font-size: 20px;
    line-height: 1.7em;
    list-style: none;
    padding: 0px;
    margin: 0px;
}
ul.book-chapters a {
    padding-left: 23px;
}
ul.book-chapters a:hover {
    background-image: url(../img/contents_book.gif);
    background-repeat: no-repeat;
    background-position: 0px 5px;
}
p.book-note-number {
    display: inline-block;
    background-color: #2a5d9f;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    min-width: 2em;
    height: 2em;
    padding: 0 0.5em;
    text-align: center;
    line-height: 2em;
    border-radius: 1em;
    margin: 0.4em 0;
    white-space: nowrap;
    box-sizing: border-box;
}
p.book-note-text {
    margin: 0 0 1.2em 1.2em;
    font-size: 1.1em;
    line-height: 1.7;
    color: #222;
    max-width: 800px;
}
div.notes-container img.book-note-illustration {
    float: none;
    margin: 0 0.4em;
    max-width: 800px;
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
}
/******* epub 2.0 *******/
.h2-title {
    text-align: center;
}
.h2-title a,
.h2-title a:hover {
    font: 900 24px 'Time New Roman', serif;
    color: #57abf7;
}
.textBook {
    max-width: 800px;
    margin: 0px auto;
    text-align: justify;
}
.poem {
    padding-left: 20px;
}
.stanza {
    padding-bottom: 20px;
}
.em {
    font-style: italic;
}
/******************* Styles for reading book text ******************/

#adskeeper-bottom {
    margin-top: 25px;
    padding: 15px;
    background-color: #c6d9f0;
    border-top: 2px solid #ccc;
    border-radius: 6px;
    max-width: 100% !important;
}
#adskeeper-bottom .ad-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}
