/* Сгенерировано из /assets/css/main.css (extract_reader_css.py): оформление текста глав для читалки v2 */
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter_18pt-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter_18pt-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter_18pt-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter_18pt-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/assets/fonts/SpaceGrotesk-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/assets/fonts/SpaceGrotesk-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/assets/fonts/SpaceGrotesk-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/assets/fonts/SpaceGrotesk-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/assets/fonts/SpaceGrotesk-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/CormorantGaramond-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/CormorantGaramond-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/CormorantGaramond-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/assets/fonts/CormorantGaramond-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Infant'; src: url('/assets/fonts/CormorantInfant-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Infant'; src: url('/assets/fonts/CormorantInfant-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Infant'; src: url('/assets/fonts/CormorantInfant-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Infant'; src: url('/assets/fonts/CormorantInfant-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Comfortaa'; src: url('/assets/fonts/Comfortaa-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Comfortaa'; src: url('/assets/fonts/Comfortaa-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Comfortaa'; src: url('/assets/fonts/Comfortaa-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Comfortaa'; src: url('/assets/fonts/Comfortaa-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Comfortaa'; src: url('/assets/fonts/Comfortaa-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Anonymous Pro'; src: url('/assets/fonts/AnonymousPro-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Anonymous Pro'; src: url('/assets/fonts/AnonymousPro-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Anonymous Pro'; src: url('/assets/fonts/AnonymousPro-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Steamy'; src: url('/assets/fonts/steamy.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bebas Neue Local'; src: url('/assets/fonts/bebas_neue_regular.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bebas Neue Local'; src: url('/assets/fonts/bebas_neue_bold.woff2') format('woff2'); font-weight: bold; font-style: normal; font-display: swap; }
@font-face { font-family: 'Erkan'; src: url('/assets/fonts/ekran.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Excalifont'; src: url('/assets/fonts/Excalifont-Regular.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'MakiSans'; src: url('/assets/fonts/MakiSans-Regular.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gabriela'; src: url('/assets/fonts/Gabriela-Regular.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bella Script'; src: url('/assets/fonts/Bella_Script_CYR.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
:root { --bg-body: #0f0f10; --bg-card: #1c1c1e; --bg-sidebar: #141414; --hero-gradient-start: #1a1a1a; --hero-gradient-end: #0f0f10; --surface-1: rgba(255, 255, 255, 0.03); --surface-2: rgba(255, 255, 255, 0.05); --surface-hover: rgba(255, 255, 255, 0.08); --surface-active: rgba(255, 255, 255, 0.1); --glass-bg: rgba(30, 30, 30, 0.70); --glass-border: rgba(255, 255, 255, 0.1); --text-primary: #E4EBFB; --text-secondary: #A0A0A0; --text-muted: #666666; --text-inverse: #000000; --accent-color: #D32F2F; --accent-hover: #b71c1c; --accent-glow: rgba(211, 47, 47, 0.4); --accent-bg-subtle: rgba(211, 47, 47, 0.15); --accent-gold: #FFB74D; --accent-gold-bg: rgba(255, 183, 77, 0.1); --danger-color: #ef5350; --danger-bg: rgba(211, 47, 47, 0.1); --success-color: #81c784; --success-bg: rgba(76, 175, 80, 0.2); --border-color: rgba(255, 255, 255, 0.1); --border-hover: rgba(255, 255, 255, 0.2); --bg-dropdown: rgba(0, 0, 0, 0.2); --toggle-bg: #333333; --toggle-knob: #ffffff; --scrollbar-track: rgba(255, 255, 255, 0.05); --scrollbar-thumb: var(--accent-color); --scrollbar-width: 8px; --nav-height: 60px; --border-radius-lg: 24px; --border-radius-md: 16px; --border-radius-sm: 12px; --font-ui: 'Inter', sans-serif; --font-book: 'EB Garamond', serif; --font-reader: 'EB Garamond', serif; --safe-top: env(safe-area-inset-top, 20px); --safe-bottom: env(safe-area-inset-bottom, 20px); --glider-bg: #48484A; --font-scale: 1; --reader-base-size: 20px; --reader-font-weight: 400; --reader-line-height: 1.6; }
body.theme-light { --bg-body: #F2F2F7; --bg-card: #FFFFFF; --bg-sidebar: #E5E5EA; --hero-gradient-start: #FFFFFF; --hero-gradient-end: #F2F2F7; --surface-1: rgba(0, 0, 0, 0.03); --surface-2: rgba(0, 0, 0, 0.05); --surface-hover: rgba(0, 0, 0, 0.04); --surface-active: rgba(0, 0, 0, 0.1); --glass-bg: rgba(255, 255, 255, 0.85); --glass-border: rgba(0, 0, 0, 0.1); --text-primary: #000000; --text-secondary: #3C3C43; --text-muted: #8E8E93; --text-inverse: #FFFFFF; --accent-glow: rgba(211, 47, 47, 0.2); --border-color: rgba(60, 60, 67, 0.15); --border-hover: rgba(60, 60, 67, 0.25); --bg-dropdown: rgba(0, 0, 0, 0.05); --toggle-bg: #8E8E93; --toggle-knob: #FFFFFF; --scrollbar-track: rgba(0, 0, 0, 0.05); --glider-bg: #FFFFFF; }
body.theme-amoled { --bg-body: #000000; --bg-card: #050505; --bg-sidebar: #000000; --hero-gradient-start: #000000; --hero-gradient-end: #000000; --surface-1: rgba(255,255,255,0.02); --surface-2: rgba(255,255,255,0.03); --surface-hover: rgba(255,255,255,0.05); --surface-active: rgba(255,255,255,0.07); --glass-bg: rgba(0,0,0,0.85); --glass-border: rgba(255,255,255,0.06); --text-primary: #d0d0d0; --text-secondary: #888888; --text-muted: #555555; --text-inverse: #ffffff; --border-color: rgba(255,255,255,0.08); --border-hover: rgba(255,255,255,0.12); --bg-dropdown: rgba(255,255,255,0.03); --accent-color: #D32F2F; --accent-hover: #b71c1c; --accent-glow: rgba(211,47,47,0.35); --scrollbar-track: rgba(255,255,255,0.03); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.9); } }
.reader-container { padding: 100px 24px 50px; max-width: 700px; margin: 0 auto; }
.chapter-header { margin-bottom: 40px; text-align: center; }
.act-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; margin-bottom: 10px; }
.chapter-num { font-family: 'Bella Script'; color: var(--accent-color); font-size: 80px; font-weight: 400; display: block; }
.chapter-name { font-family: 'Bella Script'; font-size: 90px; line-height: 0.6; margin-top: -35px; font-weight: 400; color: var(--accent-color); }
.book-text {
    font-family: var(--font-reader); font-weight: var(--reader-font-weight); font-size: calc(var(--reader-base-size) * var(--font-scale));
    line-height: var(--reader-line-height, 1.6); text-align: var(--reader-align); color: inherit;
}
.book-text p { margin-bottom: 1.2em; }
.book-text > p:first-of-type::first-letter {
    font-family: 'Gabriela', serif; font-size: 3.5em; float: left; line-height: 0.8;
    margin-right: 0.1em; margin-top: -0.1em; color: var(--accent-color); font-weight: 700;
}
.book-image, .zoomable-image-wrapper img {
    display: block; max-width: 100%; height: auto; margin: 40px auto; border: none; box-shadow: none; border-radius: 0;
}
.zoomable-image-wrapper { position: relative; display: block; margin: 40px auto; max-width: 100%; cursor: pointer; }
.zoom-icon {
    position: absolute; bottom: 15px; right: 15px; width: 36px; height: 36px; 
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; color: #fff; border: 1px solid rgba(255,255,255,0.2);
}
.lightbox {
    position: fixed; inset: 0; z-index: 1000; background: #000;
    display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: 0.3s;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-close {
    position: absolute; top: 20px; right: 20px; z-index: 1002; width: 44px; height: 44px; 
    background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer;
}
.lightbox-content { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.lightbox-img { max-width: 100dvw; max-height: 100vh; object-fit: contain; transition: 0.3s; }
.lightbox.has-caption .lightbox-img { padding-bottom: 35vh; }
.lightbox-caption-container {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, #000 30%, rgba(0,0,0,0.9) 70%, transparent 100%);
    padding: 60px 24px 40px; color: #fff; z-index: 1001; max-height: 60vh; 
    display: flex; flex-direction: column; transform: translateY(100%); transition: 0.4s;
}
.lightbox.has-caption .lightbox-caption-container { transform: translateY(0); }
.lightbox-caption-scroll { overflow-y: auto; padding-right: 10px; font-family: var(--font-book); font-size: 18px; line-height: 1.6; }
.end-logo-container { display: flex; justify-content: center; width: 100%; margin: 80px 0 50px; }
.end-logo {
    width: 100%; max-width: 520px; aspect-ratio: 3/1; background-color: var(--text-primary); opacity: 0.8;
    -webkit-mask: url('../img/content/scar-of-eternity/book-logo.svg') no-repeat center center; 
    mask: url('../img/content/scar-of-eternity/book-logo.svg') no-repeat center center;
    -webkit-mask-size: contain; mask-size: contain;
}
@media (min-width: 1024px) {
.reader-container { max-width: 1000px; padding-top: 140px; }
.book-image { max-width: 70%; }
.chapter-header { margin-bottom: 80px; }
.act-title { font-size: 14px; letter-spacing: 4px; margin-bottom: 20px; }
.chapter-num { font-size: 120px; margin-bottom: -65px; }
.chapter-name { font-size: 162px; line-height: 1.1; max-width: 900px; margin-left: auto; margin-right: auto; }
.caption-text { font-family: 'Cormorant Infant', serif; font-size: 22px; line-height: 1.6; }
}
.achievement-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    width: 90%;
    max-width: 400px;
    
    background: var(--bg-card); 
    border: 1px solid var(--accent-gold);
    border-color: var(--glass-border);
    
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 9999;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}
body.theme-light .achievement-toast {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.achievement-toast.active {
    transform: translateX(-50%) translateY(0);
}
.achievement-toast.gold {
    border-color: var(--accent-gold);
    box-shadow: 0 10px 50px rgba(255, 183, 77, 0.2);
}
.achievement-toast.gold::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 0%, var(--accent-gold-bg) 100%);
    pointer-events: none; border-radius: 16px;
}
.ach-icon-box {
    width: 48px; height: 48px;
    background: var(--surface-2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    color: var(--text-primary);
    flex-shrink: 0;
}
.achievement-toast.gold .ach-icon-box {
    color: var(--accent-gold);
    background: rgba(255, 183, 77, 0.1);
}
.ach-content {
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
}
.ach-head {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 700;
}
.ach-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.ach-close {
    background: none; border: none;
    color: var(--text-secondary);
    cursor: pointer; padding: 8px;
    transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.ach-close:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
    border-radius: 50%;
}
#quote-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: 13px; font-weight: 600;
    opacity: 0; transform: translateY(10px);
    transition: 0.2s; z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: flex; gap: 10px; align-items: center;
    pointer-events: none;
}
#quote-tooltip.active {
    opacity: 1; transform: translateY(0);
    pointer-events: auto;
}
.quote-btn {
    background: none; border: none; 
    color: var(--text-primary); 
    cursor: pointer; padding: 0;
    display: flex; align-items: center; gap: 6px;
    font-family: inherit; font-weight: 600;
}
.quote-btn:hover { color: var(--accent-color); }
.sys-alert {
    position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
    background: var(--bg-card); color: var(--text-primary); 
    padding: 10px 20px; border-radius: 30px; border: 1px solid var(--border-color);
    font-size: 13px; font-weight: 600; font-family: var(--font-ui);
    opacity: 0; pointer-events: none; transition: 0.3s;
    z-index: 9999 !important; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.sys-alert.active { opacity: 1; bottom: 120px; }
#quote-tooltip {
    position: absolute; background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--text-primary); padding: 8px 16px; border-radius: 8px;
    font-family: var(--font-ui); font-size: 13px; font-weight: 600;
    opacity: 0; transform: translateY(10px); transition: 0.2s; 
    z-index: 9000 !important; box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: flex; gap: 10px; align-items: center; pointer-events: none;
}
#quote-tooltip.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.quote-btn { background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 0; display: flex; align-items: center; gap: 6px; font-family: inherit; font-weight: 600; }
.quote-btn:hover { color: var(--accent-color); }
.achievement-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-150%);
    width: 90%; max-width: 400px; background: var(--bg-card); 
    border: 1px solid var(--border-color); border-radius: 16px; padding: 16px;
    display: flex; align-items: center; gap: 16px; z-index: 9999 !important;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); cursor: pointer;
}
.achievement-toast.active { transform: translateX(-50%) translateY(0); }
.achievement-toast.gold { border-color: var(--accent-gold); box-shadow: 0 10px 50px rgba(255, 183, 77, 0.2); }
.ach-icon-box { width: 48px; height: 48px; background: var(--surface-2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--text-primary); flex-shrink: 0; }
.achievement-toast.gold .ach-icon-box { color: var(--accent-gold); background: rgba(255, 183, 77, 0.1); }
.ach-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ach-head { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 4px; font-weight: 700; }
.ach-title { font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.ach-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 8px; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.ach-close:hover { color: var(--text-primary); background: var(--surface-hover); border-radius: 50%; }
.book-image, .zoomable-image-wrapper {
    -webkit-user-select: none;
    user-select: none;
}
.book-text {
    -webkit-user-select: text;
    user-select: text;
}
.book-text p {
    text-indent: 2em;
    margin: 1.2em 0;
}
.book-text > p:first-of-type {
    text-indent: 0;
}
.book-text hr {
    border: none;
    height: auto;
    margin: 2em 0;
    text-align: center;
    overflow: visible;
}
.book-text hr::after {
    content: '* * *';
    letter-spacing: 0.6em;
    opacity: 0.6;
}
.book-text blockquote {
    margin: 1.5em 0;
    padding: 0.2em 0 0.2em 1.2em;
    border-left: 3px solid var(--accent-color);
    font-style: italic;
    text-indent: 0;
}
.book-text blockquote p {
    text-indent: 0;
    margin: 0.5em 0;
}
.book-text blockquote + blockquote {
    margin-top: -1.5em;
}
.book-image.static {
    display: block;
    margin: 2em auto;
}
.book-image, .zoomable-image-wrapper img {
    -webkit-user-drag: none;
    user-drag: none;
}
@media (max-width: 502px) {
.sys-alert.active {
        width: 80vw;
    }
}
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000;
    display: flex;
    flex-direction: column;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
::target-text {
    background: rgba(255, 183, 77, 0.4); 
    color: inherit;
    transition: background 0.3s ease;
}
body.hide-fragments ::target-text {
    background: transparent !important;
    color: inherit !important;
}
.lightbox-caption {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #E4EBFB;
    font-family: var(--font-reader);
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
    max-width: 600px;
    width: 100%;
    max-height: 40dvh; 
    overflow-y: auto;
}
.lightbox-caption b { color: #fff; font-weight: 700; }
.lightbox-caption i { opacity: 0.8; }
.lightbox-caption:empty {
    display: none !important;
}
.reader-chapter-header { text-align: center; margin-bottom: 40px; }
.theme-action .chapter-num, .theme-action .act-title {
    font-family: 'Bebas Neue Local', sans-serif !important;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.theme-action .chapter-name {
    font-family: 'Erkan', sans-serif !important;
    font-size: 50px !important;
    margin-top: 60px !important;
    color: var(--text-primary) !important;
    letter-spacing: normal !important;
}
.theme-action .chapter-num {
    font-family: 'Erkan', sans-serif !important;
    font-size: 50px !important;
    margin-top: 0 !important;
    color: var(--text-primary) !important;
    letter-spacing: normal !important;
}
@media (max-width: 1024px) {
.theme-action .chapter-name {
        margin-top: 10px !important;
    }
}
.theme-action .book-text > p:first-of-type::first-letter {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    float: none !important;
    margin: 0 !important;
    line-height: inherit !important;
}
.theme-action .book-text h2 {
    font-family: 'Bebas Neue Local', sans-serif !important;
    font-weight: bold !important;
    font-size: 24px;
    color: var(--text-primary) !important;
    letter-spacing: 1.5px;
    margin-top: 40px;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.theme-action .lightbox-caption-container .caption-text, .theme-action .lightbox-caption-container .caption-text * {
    font-family: 'Anonymous Pro', monospace !important;
}
.end-logo-img {
    display: block;
    margin: 0 auto;
    opacity: 0.8;
    filter: brightness(0) invert(1); 
    max-width: 500px; 
    width: 100%;
}
@media (max-width: 647px) {
.end-logo-img {
        max-width: 80vw;
    }
}
body.theme-light .end-logo-img {
    filter: brightness(0);
}
.sys-alert {
    text-align: center;
}
.theme-indie .lightbox-caption-container .caption-text, .theme-indie .lightbox-caption-container .caption-text * {
    font-family: 'Excalifont', sans-serif !important;
}
.theme-indie .book-text > p:first-of-type::first-letter {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    float: none !important;
    margin: 0 !important;
    line-height: inherit !important;
}
.theme-indie .book-text > p:first-of-type {
    text-indent: 2em !important;
}
.ex-gallery-wrapper {
    position: relative;
    margin: 30px 0;
    border-radius: 16px;
    overflow: hidden;
    background: transparent; 
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.ex-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.ex-gallery::-webkit-scrollbar { 
    display: none; 
}
.ex-gallery img {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 16 / 9; 
    object-fit: cover; 
    scroll-snap-align: start;
    
    cursor: default; 
    background: transparent;
}
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    font-size: 24px;
}
.gallery-nav-btn:hover { 
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
    backdrop-filter: blur(10px);
}
.gallery-nav-btn.prev { left: 15px; }
.gallery-nav-btn.next { right: 15px; }
.gallery-nav-btn.hidden {
    opacity: 0;
    pointer-events: none;
}
@media (max-width: 768px) {
.gallery-nav-btn { display: none; }
}
.gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}
.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gallery-dot.active { 
    background: #fff; 
    transform: scale(1.3); 
}
@media (max-width: 768px) {
.gallery-nav-btn { display: none; }
}
.book-text a {
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: color 0.2s ease;
}
.book-text a:hover {
    color: var(--accent-hover);
}
.book-text a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.book-text a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}
.book-tooltip {
    padding:0 .12em;
    border-bottom:2px dotted var(--accent-color);
    cursor:help;
    transition:.2s;
}
.book-tooltip::after {
    content:"*";
    vertical-align:super;
    font-size:.65em;
    color:var(--accent-color);
    margin-left:1px;
    font-weight:700;
}
#tooltipPopup {
    position:fixed;
    background:var(--bg-card);
    border:1px solid var(--border-color);
    border-radius:12px;
    padding:12px 16px;
    width:max-content;
    max-width:260px;
    box-shadow:0 10px 30px rgba(0,0,0,.5);
    opacity:0;
    visibility:hidden;
    transform:translateY(10px);
    transition:opacity .2s cubic-bezier(.2,.8,.2,1), visibility .2s, transform .2s cubic-bezier(.2,.8,.2,1);
    pointer-events:none;
    z-index:1000;
}
#tooltipPopup.show {
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}
#tooltipPopupText {
    font-size:12px;
    color:var(--text-secondary);
    line-height:1.45;
    white-space:normal;
}
#tooltipPopupText b {
    color:var(--accent-color);
    font-weight:600;
}
#tooltipPopupArrow {
    position:absolute;
    width:12px;
    height:12px;
    background:var(--bg-card);
    border-right:1px solid var(--border-color);
    border-bottom:1px solid var(--border-color);
}
#tooltipPopup.top #tooltipPopupArrow {
    bottom:-6px;
    transform:rotate(45deg);
}
#tooltipPopup.bottom #tooltipPopupArrow {
    top:-6px;
    transform:rotate(225deg);
}
