/* Static chapter pages (/read/) — matches the reader's dark + gold look */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    background: #1a1a1a;
    color: #ccc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #d4af37; text-decoration: none; }
a:hover { color: #f4cf57; text-decoration: underline; }

.topbar {
    background: #111;
    border-bottom: 1px solid #333;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 1.1em; }
.brand:hover { color: #fff; text-decoration: none; }
.brand img { border-radius: 6px; }
.topnav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topnav a { color: #ccc; font-size: 0.95em; }
.topnav a:hover { color: #d4af37; }
.lang-select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 7px 14px;
    font: inherit;
    font-size: 0.9em;
    cursor: pointer;
}

.wrap { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 36px 24px 64px; }
.crumbs { font-size: 0.9em; color: #888; margin-bottom: 24px; }
.byline { color: #999; font-size: 0.95em; margin-bottom: 28px; }

.chapter { font-size: 1.1em; line-height: 1.9; }
.chapter h1 {
    color: #fff;
    font-size: 2.6em;
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 36px;
    padding-bottom: 18px;
    border-bottom: 2px solid #d4af37;
}
.chapter h2 { color: #d4af37; font-size: 1.4em; margin: 30px 0 14px; }
.chapter .paragraph { margin-bottom: 26px; text-indent: 30px; }
.chapter .paragraph.subtitle { text-indent: 0; color: #f0f0f0; font-weight: 700; font-size: 1.3em; margin: 32px 0 14px; line-height: 1.5; }
[dir="rtl"] .chapter { font-size: 1.2em; line-height: 2.1; }

.reader-link { margin: 40px 0 24px; padding: 16px 20px; background: #222; border: 1px solid #333; border-radius: 12px; }
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #333; padding-top: 24px; }
.pager a { display: block; max-width: 48%; padding: 12px 16px; border: 1px solid #333; border-radius: 12px; color: #ddd; }
.pager a:hover { border-color: #d4af37; text-decoration: none; }
.pager small { display: block; color: #888; font-size: 0.8em; }
.pager .next { margin-inline-start: auto; text-align: end; }

.hero { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid #d4af37; }
.hero h1 { color: #fff; font-size: 2.4em; line-height: 1.25; margin-bottom: 10px; }
.hero .names { color: #ddd; font-size: 1.1em; margin-bottom: 6px; }
.hero .byline { margin-bottom: 0; }
main h2 { color: #d4af37; font-size: 1.4em; margin: 32px 0 16px; }

.toc, .langs { list-style: none; display: grid; gap: 8px; }
.toc { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.toc a, .langs a {
    display: flex; align-items: baseline; gap: 12px;
    padding: 12px 16px; background: #222; border: 1px solid #333; border-radius: 10px; color: #eee;
}
.toc a:hover, .langs a:hover { border-color: #d4af37; color: #d4af37; text-decoration: none; }
.toc .num { color: #888; font-size: 0.85em; min-width: 1.6em; }
.langs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.langs small { color: #888; margin-inline-start: auto; font-size: 0.8em; }

.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.book { background: #222; border: 1px solid #333; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.book .vol { color: #d4af37; font-size: 0.85em; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.book h3 { color: #fff; font-size: 1.2em; }
.book p { flex: 1; font-size: 0.95em; }
.btn { align-self: flex-start; background: linear-gradient(135deg, #d4af37 0%, #c49b2c 100%); color: #111; padding: 9px 18px; border-radius: 22px; font-weight: 600; }
.btn:hover { color: #111; text-decoration: none; filter: brightness(1.08); }

.site-footer { border-top: 1px solid #333; background: #111; color: #888; text-align: center; padding: 22px 16px; font-size: 0.9em; }
.site-footer p + p { margin-top: 6px; }

@media (max-width: 640px) {
    .topbar { padding: 10px 14px; }
    .wrap { padding: 24px 16px 48px; }
    .chapter { font-size: 1.02em; }
    .chapter h1, .hero h1 { font-size: 1.8em; }
    .chapter .paragraph { text-indent: 18px; }
    .pager { flex-direction: column; }
    .pager a { max-width: 100%; }
}
