.bilingual-layout { margin-bottom: 64px; min-height: 100vh; }
.bilingual-reader { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 28px; }
.book-sidebar { position: sticky; top: 20px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.book-back { margin-bottom: 20px; font-size: .875rem; text-decoration: none; }
.book-contents { background: #fff; border: 1px solid var(--line); padding: 18px; min-height: 0; overflow-y: auto; }
.book-contents > summary { font-weight: 600; cursor: pointer; }
.book-contents input { box-sizing: border-box; width: 100%; padding: 9px 10px; margin: 16px 0 12px; border: 1px solid var(--line); border-radius: 3px; font: inherit; font-size: .875rem; }
#book-toc { display: flex; flex-direction: column; gap: 3px; }
#book-toc a { display: block; padding: 8px 10px; font-size: .8125rem; line-height: 1.45; text-decoration: none; border-left: 2px solid transparent; }
#book-toc a[hidden] { display: none; }
#book-toc a:hover { background: #f0f4f7; }
#book-toc a[aria-current] { color: var(--blue); font-weight: 600; background: #e8eff3; border-color: var(--blue); }
.book-panel { min-width: 0; scroll-margin-top: 20px; }
.book-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 24px; }
.book-tools[hidden] { display: none; }
.book-tools button { min-height: 38px; padding: 6px 12px; font-size: .8125rem; }
.book-font-controls { display: flex; gap: 6px; }
.reader .book-hint { font-size: .8125rem; line-height: 1.6; color: var(--muted); margin: -8px 0 28px; }
.book-block { scroll-margin-top: 24px; margin-bottom: 28px; }
.book-russian p:last-child { margin-bottom: 0; }
.book-block-heading { font-weight: 600; }
.book-page { color: var(--muted); font-size: .6875rem; letter-spacing: .02em; margin: 32px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.book-block:first-child .book-page { margin-top: 0; }
.book-translation { margin-top: 10px; border-left: 2px solid var(--line); padding-left: 14px; }
.book-translation > summary { width: fit-content; font-size: .75rem; color: var(--blue); cursor: pointer; padding: 3px 0; }
.book-translation-text { padding-top: 12px; color: #43566b; font-size: .94em; line-height: 1.75; }
.book-translation-text > p:last-child { margin-bottom: 0; }
.book-alternative { border-color: #b6a58b; }
.book-alternative .book-translation-text { color: #665338; }
.book-text img { max-width: 100%; max-height: 180px; width: auto; height: auto; }
.book-text table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .85em; line-height: 1.5; margin: 16px 0; }
.book-text td, .book-text th { border: 1px solid var(--line); padding: 8px; vertical-align: top; }
.book-bottom-navigation { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 40px; }
.book-bottom-navigation a { max-width: 48%; font-size: .875rem; text-decoration: none; }
.book-bottom-navigation a:last-child { margin-left: auto; text-align: right; }
.book-bottom-navigation a[hidden] { display: none; }
.book-reader-error button { padding: 8px 16px; }
@media (max-width: 1100px) and (min-width: 901px) { .bilingual-reader { grid-template-columns: 220px minmax(0,1fr); gap: 20px; } .book-panel { padding: 28px; } }
@media (max-width: 900px) { .bilingual-reader { grid-template-columns: minmax(0,1fr); gap: 16px; } .book-sidebar { position: static; max-height: none; } .book-contents[open] { max-height: 55vh; } .book-back { margin-bottom: 16px; } .bilingual-layout { margin-bottom: 40px; } }
