:root{
    --black:#050708;
    --panel:#081016;
    --panel2:#0d1419;
    --panel3:#11191f;
    --gold:#d99b32;
    --gold2:#f4ca66;
    --gold3:#fff0a0;
    --line:rgba(226,159,48,.56);
    --line2:rgba(241,194,94,.24);
    --cream:#fff5dd;
    --muted:#bda980;
    --paper:#eee1c0;
    --shadow:0 25px 80px rgba(0,0,0,.55);
}

*{
    box-sizing:border-box;
}

html{
    background:#030506;
}

body{
    margin:0;
}

body.premium-body{
    min-height:100vh;
    direction:rtl;
    text-align:right;
    color:var(--cream);
    font-family:
        Arial,
        "Segoe UI",
        sans-serif;
    background:
        linear-gradient(
            90deg,
            rgba(1,4,5,.15),
            rgba(2,6,8,.82) 21%,
            rgba(2,6,8,.93) 50%,
            rgba(2,6,8,.82) 79%,
            rgba(1,4,5,.15)
        ),
        none
        center center /
        cover fixed;
}

body.premium-body:before,
body.premium-body:after{
    content:"";
    position:fixed;
    z-index:-1;
    top:44%;
    width:170px;
    height:330px;
    border-radius:50%;
    background:
        radial-gradient(
            ellipse,
            rgba(255,195,77,.58),
            rgba(206,91,17,.16) 35%,
            transparent 68%
        );
    filter:blur(10px);
    pointer-events:none;
}

body.premium-body:before{
    left:-48px;
}

body.premium-body:after{
    right:-48px;
}

a{
    color:inherit;
}

.premium-top{
    width:min(1430px,95vw);
    min-height:126px;
    margin:0 auto;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:22px;
    direction:rtl;
    position:relative;
    z-index:100;
}

.premium-brand{
    width:215px;
    height:126px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:0;
    text-decoration:none;
    color:var(--gold2);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:25px;
    font-weight:700;
    text-shadow:
        0 0 18px rgba(244,190,73,.22);
}

.premium-brand img{
    width:108px;
    height:63px;
    object-fit:contain;
    margin-bottom:-2px;
}

.premium-nav{
    flex:1;
    min-height:67px;
    margin-bottom:7px;
    padding:0 12px;
    display:flex;
    direction:rtl;
    align-items:stretch;
    justify-content:flex-start;
    overflow:hidden;
    border:
        1px solid rgba(226,158,46,.88);
    border-radius:18px;
    background:
        linear-gradient(
            180deg,
            rgba(10,17,21,.96),
            rgba(4,10,14,.97)
        );
    box-shadow:
        0 15px 45px rgba(0,0,0,.42),
        inset 0 1px 0 rgba(255,255,255,.04);
}

.premium-nav-link{
    position:relative;
    min-width:max-content;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    color:#efe5cf;
    border-inline-start:
        1px solid rgba(255,255,255,.035);
    transition:
        color .18s ease,
        background .18s ease;
    font-size:15px;
}

.premium-nav-link:hover{
    color:var(--gold2);
    background:
        rgba(232,166,50,.06);
}

.premium-nav-link.active{
    color:var(--gold2);
    font-weight:700;
    background:
        linear-gradient(
            180deg,
            rgba(196,132,29,.11),
            rgba(220,157,46,.03)
        );
}

.premium-nav-link.active:after{
    content:"";
    position:absolute;
    right:9px;
    left:9px;
    bottom:0;
    height:2px;
    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold2),
            transparent
        );
    box-shadow:
        0 0 10px
        rgba(245,197,94,.65);
}

.theme-moon{
    width:55px;
    border:0;
    border-inline-end:
        1px solid rgba(255,255,255,.05);
    background:transparent;
    color:var(--gold2);
    font-size:25px;
    cursor:pointer;
}

.home-shell,
.library-shell{
    width:min(1425px,94vw);
    margin:18px auto 70px;
}

.hero-premium{
    min-height:285px;
    padding:44px 32px;
    border:
        1px solid rgba(226,159,48,.53);
    border-radius:20px;
    background:
        radial-gradient(
            circle at 50% -15%,
            rgba(226,158,45,.15),
            transparent 44%
        ),
        linear-gradient(
            180deg,
            rgba(5,11,14,.86),
            rgba(3,8,11,.93)
        );
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
}

.hero-premium .hero-book{
    width:120px;
    height:68px;
    margin-bottom:12px;
}

.hero-premium h1{
    margin:0;
    color:#fff8e8;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:clamp(42px,5vw,70px);
    font-weight:500;
    letter-spacing:-1px;
}

.hero-premium p{
    max-width:660px;
    margin:10px auto 0;
    color:#c7b793;
    font-size:15px;
    line-height:1.7;
}

.library-cards{
    margin-top:17px;
    display:grid;
    grid-template-columns:
        repeat(4,minmax(0,1fr));
    gap:13px;
}

.library-card{
    min-height:150px;
    padding:20px 18px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    text-decoration:none;
    border:
        1px solid rgba(225,157,46,.40);
    border-radius:14px;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(226,161,53,.10),
            transparent 52%
        ),
        linear-gradient(
            180deg,
            rgba(12,20,24,.95),
            rgba(4,10,14,.97)
        );
    box-shadow:
        0 15px 35px rgba(0,0,0,.30);
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.library-card:hover{
    transform:translateY(-3px);
    border-color:rgba(245,195,91,.87);
    box-shadow:
        0 20px 50px rgba(0,0,0,.42),
        0 0 25px rgba(216,146,31,.08);
}

.library-card .card-icon{
    height:35px;
    margin-bottom:9px;
    display:flex;
    align-items:center;
    color:var(--gold2);
    font-size:31px;
}

.library-card strong{
    color:#fff4d9;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:20px;
}

.library-card small{
    margin-top:6px;
    color:#af9f7d;
    font-size:12px;
}

.section-head{
    margin:10px 0 22px;
    padding:20px 0 15px;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    border-bottom:
        1px solid rgba(230,166,54,.26);
}

.section-head h1{
    margin:0;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    color:#fff4dc;
    font-size:36px;
    font-weight:500;
}

.section-head p{
    margin:5px 0 0;
    color:#b3a17d;
}

.library-search{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:min(430px,100%);
}

.library-search input{
    width:100%;
    height:43px;
    padding:0 14px;
    border:
        1px solid rgba(226,159,47,.56);
    border-radius:9px;
    outline:none;
    direction:rtl;
    background:
        rgba(4,10,13,.89);
    color:#fff4d8;
}

.library-search input:focus{
    border-color:var(--gold2);
    box-shadow:
        0 0 0 3px
        rgba(226,159,47,.08);
}

.gold-button{
    height:43px;
    padding:0 18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:
        1px solid #c88627;
    border-radius:8px;
    background:
        linear-gradient(
            180deg,
            #e2aa48,
            #9d5f18
        );
    color:#160e05;
    font-weight:800;
    text-decoration:none;
    cursor:pointer;
}

.book-group{
    margin:28px 0 38px;
}

.book-group > h2{
    margin:0 0 13px;
    padding:0 2px 9px;
    color:var(--gold2);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:25px;
    font-weight:500;
    border-bottom:
        1px solid rgba(226,159,47,.22);
}

.book-grid{
    display:grid;
    grid-template-columns:
        repeat(auto-fill,minmax(205px,1fr));
    gap:11px;
}

.book-card{
    min-height:126px;
    padding:15px 16px;
    display:flex;
    flex-direction:column;
    text-decoration:none;
    border:
        1px solid rgba(221,153,43,.31);
    border-radius:10px;
    background:
        linear-gradient(
            145deg,
            rgba(16,24,28,.95),
            rgba(5,11,14,.98)
        );
    transition:.16s ease;
}

.book-card:hover{
    border-color:
        rgba(244,194,91,.76);
    transform:
        translateY(-2px);
}

.book-card h3{
    margin:0;
    color:#fff2d1;
    font-size:16px;
}

.book-card small{
    margin-top:5px;
    color:#9e9074;
    line-height:1.5;
}

.book-card .book-meta{
    margin-top:auto;
    padding-top:13px;
    color:var(--gold2);
    font-size:11px;
}

.reader-grid{
    width:min(1435px,96vw);
    height:calc(100vh - 143px);
    min-height:640px;
    margin:8px auto 22px;
    display:grid;
    grid-template-columns:
        170px minmax(0,1fr) 270px;
    grid-template-areas:
        "thumb center nav";
    gap:10px;
    direction:ltr;
}

.reader-thumbs,
.reader-nav,
.reader-center{
    direction:rtl;
}

.reader-thumbs{
    grid-area:thumb;
    min-width:0;
    overflow:hidden;
    border:
        1px solid rgba(219,148,36,.55);
    border-radius:14px;
    background:
        linear-gradient(
            180deg,
            rgba(7,13,17,.96),
            rgba(2,7,10,.98)
        );
    box-shadow:
        0 18px 45px rgba(0,0,0,.30);
}

.side-heading{
    height:55px;
    padding:0 17px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    color:var(--gold2);
    border-bottom:
        1px solid rgba(222,153,43,.24);
    font-size:13px;
}

.tiny-grid{
    font-size:21px;
}

.thumb-list{
    height:calc(100% - 55px);
    padding:11px 10px 25px;
    overflow:auto;
    scrollbar-width:thin;
    scrollbar-color:
        #9d681f
        transparent;
}

.thumb-item{
    display:block;
    margin-bottom:12px;
    padding:5px;
    text-decoration:none;
    color:#e8d8b3;
    border:
        1px solid rgba(209,145,39,.16);
    border-radius:7px;
    background:#0c1216;
}

.thumb-item.active{
    border-color:var(--gold2);
    box-shadow:
        0 0 14px rgba(234,175,60,.22);
}

.thumb-item canvas{
    width:100%;
    height:auto;
    display:block;
    border-radius:3px;
    background:#e5d8ba;
}

.thumb-label{
    padding:5px 2px 1px;
    text-align:center;
    font-size:11px;
}

.reader-center{
    grid-area:center;
    min-width:0;
    overflow:hidden;
    border:
        1px solid rgba(215,142,31,.50);
    border-radius:14px;
    background:
        linear-gradient(
            180deg,
            rgba(8,13,16,.98),
            rgba(4,8,10,.99)
        );
    box-shadow:var(--shadow);
}

.reader-toolbar{
    min-height:66px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    border-bottom:
        1px solid rgba(222,151,38,.24);
}

.toolbar-main{
    min-height:65px;
    padding:5px 13px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    direction:rtl;
}

.reader-icon{
    min-width:37px;
    height:37px;
    padding:0 9px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:
        1px solid transparent;
    border-radius:7px;
    background:transparent;
    color:var(--gold2);
    font-size:20px;
    cursor:pointer;
}

.reader-icon:hover,
.reader-icon.active{
    border-color:
        rgba(224,158,48,.50);
    background:
        rgba(222,153,43,.09);
}

.page-indicator{
    min-width:144px;
    height:37px;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:
        1px solid rgba(221,152,42,.49);
    border-radius:6px;
    background:
        rgba(7,10,12,.75);
    color:#f0e1c0;
    font-size:13px;
}

.toolbar-extra{
    padding:0 12px 7px;
    text-align:center;
}

.toolbar-extra form{
    display:inline-flex;
    align-items:center;
    gap:5px;
}

.toolbar-extra input,
.toolbar-extra select{
    height:31px;
    border:
        1px solid rgba(220,154,46,.42);
    border-radius:5px;
    background:#0a1014;
    color:#ead8b2;
    padding:0 7px;
}

.toolbar-extra button{
    height:31px;
}

.book-stage{
    position:relative;
    height:calc(100% - 66px);
    padding:21px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:0;
    direction:ltr;
    overflow:auto;
    background:
        radial-gradient(
            ellipse at 50% 42%,
            rgba(182,122,39,.11),
            transparent 45%
        ),
        #090e11;
}

.page-slot{
    position:relative;
    min-width:0;
    width:50%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.page-slot canvas.pdf-page{
    display:block;
    max-width:none;
    background:#eee1c0;
    box-shadow:
        0 9px 29px rgba(0,0,0,.52);
}

.left-page canvas.pdf-page{
    border-radius:5px 0 0 5px;
}

.right-page canvas.pdf-page{
    border-radius:0 5px 5px 0;
}

.book-spine{
    position:absolute;
    z-index:15;
    top:5%;
    bottom:5%;
    left:50%;
    width:16px;
    transform:translateX(-50%);
    pointer-events:none;
    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.52),
            rgba(91,55,20,.30),
            rgba(255,229,161,.16),
            rgba(0,0,0,.52)
        );
    filter:blur(.6px);
    border-radius:50%;
}

.render-surface{
    position:relative;
    display:inline-block;
    line-height:0;
}

.marks-layer{
    position:absolute;
    inset:0;
    z-index:40;
    pointer-events:none;
    cursor:crosshair;
    touch-action:none;
}

.marks-layer.active{
    pointer-events:auto;
}

.pdf-mark{
    position:absolute;
    background:
        rgba(255,218,54,.28);
    border:
        1px solid
        rgba(255,190,32,.62);
    box-shadow:
        inset 0 0 8px
        rgba(255,241,113,.17);
}

.reader-nav{
    grid-area:nav;
    min-width:0;
    overflow:hidden;
    border:
        1px solid rgba(219,148,36,.55);
    border-radius:14px;
    background:
        linear-gradient(
            180deg,
            rgba(7,13,17,.97),
            rgba(2,7,10,.99)
        );
    box-shadow:
        0 18px 45px rgba(0,0,0,.32);
}

.reader-nav-title{
    padding:28px 19px 16px;
    border-bottom:
        1px solid rgba(222,153,43,.25);
}

.reader-nav-title h1{
    margin:0;
    color:var(--gold2);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:27px;
    font-weight:600;
}

.reader-nav-title p{
    margin:6px 0 0;
    color:#998a6e;
    font-size:12px;
}

.reader-nav-body{
    height:calc(100% - 103px);
    padding:12px;
    overflow:auto;
    scrollbar-width:thin;
    scrollbar-color:
        #95621c
        transparent;
}

.reader-section-button{
    width:100%;
    min-height:46px;
    margin-bottom:9px;
    padding:0 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    text-decoration:none;
    border:
        1px solid rgba(211,143,34,.33);
    border-radius:7px;
    background:
        rgba(8,14,18,.88);
    color:#efd79c;
}

.reader-page-link{
    width:100%;
    min-height:39px;
    padding:0 15px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    text-decoration:none;
    border-bottom:
        1px solid rgba(255,255,255,.045);
    color:#e0c27d;
    font-size:14px;
}

.reader-page-link:hover{
    background:
        rgba(213,144,36,.07);
}

.reader-page-link.active{
    color:#fff0b7;
    background:
        linear-gradient(
            90deg,
            rgba(214,145,35,.08),
            rgba(214,145,35,.25)
        );
    border:
        1px solid rgba(226,164,53,.44);
    border-radius:6px;
}

.reader-page-link .chev{
    color:#d78f27;
}

.reader-select{
    width:100%;
    height:45px;
    margin-bottom:9px;
    padding:0 12px;
    border:
        1px solid rgba(219,149,38,.43);
    border-radius:7px;
    background:#081015;
    color:#efd59a;
}

.empty-page{
    width:85%;
    max-width:580px;
    aspect-ratio:.71;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#87795f;
    border:
        1px solid rgba(216,149,43,.16);
    background:#0b1115;
}

.status-toast{
    position:fixed;
    z-index:999;
    left:50%;
    bottom:25px;
    transform:
        translateX(-50%)
        translateY(20px);
    padding:10px 16px;
    border:
        1px solid rgba(229,165,57,.58);
    border-radius:8px;
    background:
        rgba(5,10,13,.95);
    color:#f4d58d;
    opacity:0;
    pointer-events:none;
    transition:.2s ease;
}

.status-toast.show{
    opacity:1;
    transform:
        translateX(-50%)
        translateY(0);
}

@media(max-width:1180px){

    .premium-nav-link{
        padding:0 13px;
        font-size:13px;
    }

    .reader-grid{
        grid-template-columns:
            135px
            minmax(0,1fr)
            225px;
    }

    .library-cards{
        grid-template-columns:
            repeat(3,minmax(0,1fr));
    }
}

@media(max-width:900px){

    .premium-top{
        width:96vw;
        min-height:auto;
        padding-top:8px;
        display:block;
    }

    .premium-brand{
        width:100%;
        height:85px;
        flex-direction:row;
        gap:8px;
        justify-content:flex-end;
    }

    .premium-brand img{
        width:75px;
        height:55px;
    }

    .premium-nav{
        min-height:52px;
        overflow-x:auto;
        justify-content:flex-start;
        border-radius:12px;
    }

    .premium-nav-link{
        min-height:50px;
        padding:0 15px;
    }

    .reader-grid{
        width:96vw;
        height:auto;
        min-height:0;
        grid-template-columns:1fr;
        grid-template-areas:
            "nav"
            "center";
    }

    .reader-thumbs{
        display:none;
    }

    .reader-nav{
        max-height:220px;
    }

    .reader-nav-body{
        height:auto;
        max-height:140px;
    }

    .reader-center{
        height:calc(100vh - 300px);
        min-height:520px;
    }

    .library-cards{
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

    .section-head{
        align-items:stretch;
        flex-direction:column;
    }

    .library-search{
        min-width:0;
        width:100%;
    }
}

@media(max-width:650px){

    .library-cards{
        grid-template-columns:1fr;
    }

    .book-grid{
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

    .toolbar-main{
        justify-content:flex-start;
        overflow-x:auto;
    }

    .page-indicator{
        min-width:112px;
    }

    .book-stage{
        padding:8px;
    }

    .left-page{
        display:none;
    }

    .right-page{
        width:100%;
    }

    .book-spine{
        display:none;
    }

    .reader-center{
        min-height:500px;
    }
}

/* ==========================================================
   RACHAMIM TORAH 1.5.1
   HIGH QUALITY PDF READER
   ========================================================== */

.reader-center{
    min-width:0;
}

.book-stage{
    overflow:auto !important;
    justify-content:flex-start !important;
    align-items:flex-start !important;
    scroll-behavior:smooth;
    padding:18px 22px 38px !important;
}

.book-stage.single-page-mode{
    display:flex !important;
    justify-content:center !important;
    align-items:flex-start !important;
}

.book-stage.single-page-mode .right-page{
    width:100% !important;
    min-width:100% !important;
    display:flex !important;
    justify-content:center !important;
    align-items:flex-start !important;
}

.book-stage.single-page-mode .left-page{
    display:none !important;
}

.book-stage.single-page-mode .book-spine{
    display:none !important;
}

.book-stage.two-page-mode{
    display:flex !important;
    justify-content:center !important;
    align-items:flex-start !important;
    gap:0 !important;
}

.book-stage.two-page-mode .page-slot{
    width:50% !important;
    min-width:50% !important;
    display:flex !important;
    justify-content:center !important;
    align-items:flex-start !important;
}

.book-stage.two-page-mode .book-spine{
    display:block !important;
}

.render-surface{
    flex:none !important;
}

.page-slot canvas.pdf-page{
    image-rendering:auto;
    backface-visibility:hidden;
}

.single-page-mode .render-surface{
    margin:0 auto;
}

.single-page-mode canvas.pdf-page{
    box-shadow:
        0 16px 48px rgba(0,0,0,.62),
        0 0 0 1px rgba(217,155,50,.16);
    border-radius:4px !important;
}

.reader-loading{
    min-height:500px;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#d9b45f;
    font-size:16px;
}

.pdf-error-box{
    min-height:420px;
    width:min(620px,90%);
    margin:35px auto;
    padding:35px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:10px;
    text-align:center;
    border:
        1px solid rgba(220,154,45,.42);
    border-radius:12px;
    color:#e8ce91;
    background:
        rgba(8,13,16,.92);
}

.pdf-error-box strong{
    color:#f5d77f;
    font-size:17px;
}

.pdf-error-box span{
    color:#aa9977;
}

.original-pdf-button{
    min-width:52px !important;
    padding-inline:9px !important;
    font-size:11px !important;
    font-weight:800;
    letter-spacing:.4px;
}

#spreadBtn{
    min-width:41px !important;
}

#spreadBtn.active{
    color:#fff0a0;
    border-color:
        rgba(232,171,64,.72);
    background:
        rgba(221,151,42,.14);
}

@media(min-width:901px){

    .reader-grid{
        grid-template-columns:
            138px
            minmax(0,1fr)
            255px !important;
    }

    .single-page-mode .right-page{
        padding-inline:
            clamp(8px,2vw,30px);
    }
}

@media(max-width:900px){

    .book-stage{
        padding:
            8px 4px 28px !important;
    }

    .book-stage.two-page-mode .left-page{
        display:none !important;
    }

    .book-stage.two-page-mode .right-page{
        width:100% !important;
        min-width:100% !important;
    }

    .book-stage.two-page-mode .book-spine{
        display:none !important;
    }
}

/* ==========================================================
   RACHAMIM TORAH 1.5.2
   OFFICIAL PDF.JS VIEWER
   ========================================================== */

.book-stage{
    position:relative;
    overflow:hidden !important;
    padding:0 !important;
    align-items:stretch !important;
    justify-content:stretch !important;
    background:#080d10 !important;
}

.page-slot{
    position:relative;
    height:100% !important;
    min-height:100% !important;
    overflow:hidden !important;
}

.official-pdf-frame{
    display:block;
    width:100%;
    height:100%;
    min-height:100%;
    border:0;
    background:#080d10;
}

.book-stage.official-single-mode{
    display:block !important;
}

.book-stage.official-single-mode .right-page{
    display:block !important;
    width:100% !important;
    height:100% !important;
    min-width:100% !important;
}

.book-stage.official-single-mode .left-page{
    display:none !important;
}

.book-stage.official-single-mode .book-spine{
    display:none !important;
}

.book-stage.official-spread-mode{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:1px !important;
}

.book-stage.official-spread-mode .right-page,
.book-stage.official-spread-mode .left-page{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    height:100% !important;
}

.book-stage.official-spread-mode .book-spine{
    display:block !important;
}

.original-pdf-button{
    min-width:52px !important;
    font-size:11px !important;
    font-weight:800 !important;
}

#spreadBtn{
    min-width:40px !important;
}

#spreadBtn.active{
    border-color:
        rgba(240,187,76,.72) !important;
    background:
        rgba(222,153,43,.14) !important;
    color:#fff0a0 !important;
}

@media(max-width:900px){

    .book-stage.official-spread-mode{
        display:block !important;
    }

    .book-stage.official-spread-mode .left-page{
        display:none !important;
    }

    .book-stage.official-spread-mode .right-page{
        width:100% !important;
    }

    .book-stage.official-spread-mode .book-spine{
        display:none !important;
    }
}

/* ==========================================================
   RACHAMIM TORAH 1.5.3
   VISUAL MATCH + TRUE FULLSCREEN
   ========================================================== */

html{
    min-height:100%;
    background:#050504 !important;
}

body.premium-body{
    position:relative;
    min-height:100vh;
    isolation:isolate;
    background-color:#070604 !important;
    background-image:
        linear-gradient(
            180deg,
            rgba(2,5,6,.10) 0%,
            rgba(2,5,6,.17) 20%,
            rgba(2,5,6,.31) 100%
        ),
        none !important;
    background-position:
        center top,
        center top !important;
    background-size:
        cover,
        cover !important;
    background-repeat:
        no-repeat,
        no-repeat !important;
    background-attachment:
        fixed,
        fixed !important;
}

body.premium-body:before,
body.premium-body:after{
    content:"" !important;
    position:fixed !important;
    z-index:-1 !important;
    pointer-events:none !important;
    top:0 !important;
    bottom:0 !important;
    width:190px !important;
    height:auto !important;
    border-radius:0 !important;
    filter:none !important;
    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,.04),
            rgba(226,139,38,.035) 50%,
            rgba(0,0,0,.10)
        ) !important;
}

body.premium-body:before{
    left:0 !important;
}

body.premium-body:after{
    right:0 !important;
}

.premium-top{
    width:min(1460px,93vw) !important;
    position:relative !important;
    z-index:50 !important;
    pointer-events:auto !important;
}

.premium-brand,
.premium-nav,
.premium-nav-link,
.theme-moon{
    pointer-events:auto !important;
}

.premium-nav{
    background:
        linear-gradient(
            180deg,
            rgba(5,12,15,.965),
            rgba(2,8,11,.985)
        ) !important;
    border-color:
        rgba(226,159,48,.88) !important;
    box-shadow:
        0 12px 38px rgba(0,0,0,.53),
        inset 0 1px 0 rgba(255,230,174,.055) !important;
}

.home-shell,
.library-shell{
    width:min(1460px,93vw) !important;
    position:relative !important;
    z-index:5 !important;
}

.hero-premium{
    background:
        radial-gradient(
            ellipse at 50% 8%,
            rgba(206,137,35,.11),
            transparent 43%
        ),
        linear-gradient(
            180deg,
            rgba(3,9,12,.955),
            rgba(2,7,10,.975)
        ) !important;
    border-color:
        rgba(226,159,48,.54) !important;
    box-shadow:
        0 25px 65px rgba(0,0,0,.48),
        inset 0 1px 0 rgba(255,228,169,.035) !important;
}

.library-card{
    position:relative !important;
    z-index:10 !important;
    pointer-events:auto !important;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(226,161,53,.095),
            transparent 48%
        ),
        linear-gradient(
            180deg,
            rgba(8,16,20,.965),
            rgba(2,8,11,.985)
        ) !important;
}

.book-card,
.gold-button,
.library-search input,
.library-search button{
    position:relative !important;
    z-index:10 !important;
    pointer-events:auto !important;
}

.reader-grid{
    position:relative !important;
    z-index:10 !important;
}

.reader-center{
    display:flex !important;
    flex-direction:column !important;
    min-width:0 !important;
    overflow:hidden !important;
}

.reader-toolbar{
    flex:0 0 auto !important;
    position:relative !important;
    z-index:70 !important;
}

.reader-toolbar button,
.reader-toolbar a,
.reader-toolbar input,
.reader-toolbar select{
    pointer-events:auto !important;
}

.book-stage{
    flex:1 1 auto !important;
    min-height:0 !important;
}

.reader-nav,
.reader-thumbs{
    position:relative !important;
    z-index:20 !important;
}

.reader-nav a,
.reader-nav button,
.reader-nav select,
.reader-thumbs a{
    pointer-events:auto !important;
}

.reader-center:fullscreen,
.reader-center.native-fullscreen-active,
.reader-center.reader-css-fullscreen{
    width:100vw !important;
    height:100vh !important;
    max-width:none !important;
    max-height:none !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    position:fixed !important;
    inset:0 !important;
    z-index:2147483000 !important;
    background:#05090b !important;
    box-shadow:none !important;
}

.reader-center:fullscreen .reader-toolbar,
.reader-center.native-fullscreen-active .reader-toolbar,
.reader-center.reader-css-fullscreen .reader-toolbar{
    min-height:64px !important;
    flex:0 0 64px !important;
    background:
        linear-gradient(
            180deg,
            #0a1115,
            #04090c
        ) !important;
    border-bottom:
        1px solid rgba(224,158,47,.36) !important;
}

.reader-center:fullscreen .book-stage,
.reader-center.native-fullscreen-active .book-stage,
.reader-center.reader-css-fullscreen .book-stage{
    flex:1 1 auto !important;
    width:100vw !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    border:0 !important;
    background:#080d10 !important;
}

.reader-center:fullscreen .page-slot,
.reader-center.native-fullscreen-active .page-slot,
.reader-center.reader-css-fullscreen .page-slot{
    height:100% !important;
    min-height:100% !important;
}

.reader-center:fullscreen .official-pdf-frame,
.reader-center.native-fullscreen-active .official-pdf-frame,
.reader-center.reader-css-fullscreen .official-pdf-frame{
    width:100% !important;
    height:100% !important;
    min-height:100% !important;
}

.reader-center:fullscreen .toolbar-main,
.reader-center.native-fullscreen-active .toolbar-main,
.reader-center.reader-css-fullscreen .toolbar-main{
    min-height:62px !important;
}

.reader-center:fullscreen .page-indicator,
.reader-center.native-fullscreen-active .page-indicator,
.reader-center.reader-css-fullscreen .page-indicator{
    min-width:170px !important;
}

@media(min-width:1500px){

    .premium-top,
    .home-shell,
    .library-shell{
        width:min(1510px,92vw) !important;
    }
}

@media(max-width:900px){

    body.premium-body{
        background-size:
            auto 100vh,
            auto 100vh !important;
    }

    body.premium-body:before,
    body.premium-body:after{
        display:none !important;
    }

    .premium-top,
    .home-shell,
    .library-shell{
        width:96vw !important;
    }
}

/* BEGIN REFERENCE_MATCH_UI_1.5.9 */

:root{
    --ref-gold:#e2a63a;
    --ref-gold-soft:#c98a27;
    --ref-panel:#050b10;
    --ref-panel-2:#071017;
    --ref-border:rgba(220,155,48,.78);
    --ref-reader-left:7.78vw;
    --ref-reader-right:4.72vw;
    --ref-reader-width:87.50vw;
    --ref-header-left:6.28vw;
    --ref-header-right:4.30vw;
    --ref-header-width:89.42vw;
}

html{
    min-height:100%;
    background:#020507 !important;
}

body.premium-body{
    position:relative !important;
    isolation:isolate !important;
    min-height:100vh !important;
    overflow-x:hidden !important;
    background-color:#020507 !important;
    background-image:url("/assets/library-bg-base-v159.webp?v=161") !important;
    background-repeat:no-repeat !important;
    background-position:center center !important;
    background-size:cover !important;
    background-attachment:fixed !important;
}

body.premium-body::before{
    content:"" !important;
    display:block !important;
    position:fixed !important;
    z-index:0 !important;
    pointer-events:none !important;
    top:0 !important;
    bottom:0 !important;
    left:0 !important;
    width:7.78vw !important;
    min-width:72px !important;
    max-width:160px !important;
    height:100vh !important;
    opacity:1 !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    filter:none !important;
    transform:none !important;
    background:url("/assets/library-side-left-v159.webp?v=160") left top / 100% 100% no-repeat !important;
}

body.premium-body::after{
    content:"" !important;
    display:block !important;
    position:fixed !important;
    z-index:0 !important;
    pointer-events:none !important;
    top:0 !important;
    bottom:0 !important;
    right:0 !important;
    left:auto !important;
    width:4.72vw !important;
    min-width:44px !important;
    max-width:96px !important;
    height:100vh !important;
    opacity:1 !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    filter:none !important;
    transform:none !important;
    background:url("/assets/library-side-right-v159.webp?v=160") right top / 100% 100% no-repeat !important;
}

.premium-top{
    box-sizing:border-box !important;
    position:relative !important;
    z-index:40 !important;
    width:var(--ref-header-width) !important;
    max-width:none !important;
    height:21.57vh !important;
    min-height:176px !important;
    max-height:220px !important;
    margin:0 var(--ref-header-right) 0 var(--ref-header-left) !important;
    padding:0 !important;
    display:flex !important;
    direction:rtl !important;
    align-items:flex-end !important;
    justify-content:space-between !important;
    gap:16px !important;
}

.premium-brand{
    position:relative !important;
    isolation:isolate !important;
    flex:0 0 14.1vw !important;
    min-width:200px !important;
    max-width:250px !important;
    height:100% !important;
    margin:0 !important;
    padding:8px 8px 16px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
    align-items:center !important;
    overflow:visible !important;
}

.premium-brand::before{
    content:"" !important;
    position:absolute !important;
    z-index:-1 !important;
    width:180px !important;
    height:180px !important;
    top:-38px !important;
    left:50% !important;
    transform:translateX(-50%) rotate(45deg) !important;
    border:1px solid rgba(196,127,31,.55) !important;
    background:
        radial-gradient(circle at 38% 30%, rgba(255,191,74,.08), transparent 37%),
        linear-gradient(145deg, rgba(8,15,20,.97), rgba(2,7,11,.98)) !important;
    box-shadow:
        0 15px 55px rgba(0,0,0,.58),
        inset 0 0 0 1px rgba(255,222,154,.025) !important;
}

.premium-brand img{
    position:relative !important;
    z-index:2 !important;
    width:128px !important;
    height:78px !important;
    margin:3px auto 0 !important;
    object-fit:contain !important;
}

.premium-brand span{
    position:relative !important;
    z-index:2 !important;
    margin-top:0 !important;
    color:#edbd58 !important;
    font-size:clamp(22px,1.55vw,29px) !important;
    line-height:1.1 !important;
    text-shadow:0 2px 14px rgba(239,171,57,.22) !important;
}

.premium-nav{
    position:relative !important;
    z-index:50 !important;
    flex:1 1 auto !important;
    width:auto !important;
    height:7.66vh !important;
    min-height:66px !important;
    max-height:76px !important;
    margin:0 !important;
    padding:0 10px !important;
    align-items:stretch !important;
    border:1px solid rgba(225,158,46,.92) !important;
    border-radius:18px !important;
    background:linear-gradient(180deg, rgba(3,10,14,.96), rgba(2,7,11,.985)) !important;
    box-shadow:
        0 16px 45px rgba(0,0,0,.50),
        inset 0 1px 0 rgba(255,236,195,.035) !important;
}

.premium-nav-link{
    min-height:100% !important;
    padding:0 clamp(12px,1.25vw,23px) !important;
    color:#efe2c4 !important;
    font-size:clamp(13px,.95vw,17px) !important;
}

.premium-nav-link.active{
    color:#e9b64c !important;
    background:linear-gradient(180deg, rgba(198,132,32,.10), rgba(198,132,32,.035)) !important;
}

.premium-nav-link.active::after{
    height:2px !important;
    background:linear-gradient(90deg, transparent, #e4aa3b, transparent) !important;
}

.home-shell,
.library-shell{
    position:relative !important;
    z-index:20 !important;
    width:var(--ref-header-width) !important;
    max-width:none !important;
    margin:12px var(--ref-header-right) 70px var(--ref-header-left) !important;
}

.reader-grid{
    box-sizing:border-box !important;
    position:relative !important;
    z-index:30 !important;
    width:var(--ref-reader-width) !important;
    max-width:none !important;
    height:75.66vh !important;
    min-height:560px !important;
    max-height:none !important;
    margin:1.28vh var(--ref-reader-right) 1.49vh var(--ref-reader-left) !important;
    grid-template-columns:
        clamp(150px,10.82vw,185px)
        minmax(0,1fr)
        clamp(245px,17.52vw,295px) !important;
    gap:clamp(7px,.53vw,10px) !important;
    direction:ltr !important;
}

.reader-thumbs{
    height:100% !important;
    border:1px solid rgba(220,151,44,.76) !important;
    border-radius:14px !important;
    background:linear-gradient(180deg, rgba(4,11,15,.975), rgba(2,7,10,.99)) !important;
    box-shadow:0 18px 46px rgba(0,0,0,.43) !important;
}

.side-heading{
    height:7.3vh !important;
    min-height:55px !important;
    max-height:67px !important;
    color:#e5ad3c !important;
}

.thumb-list{
    padding:11px 10px 24px !important;
}

.thumb-item{
    margin-bottom:13px !important;
    padding:5px !important;
    border:1px solid rgba(213,146,39,.23) !important;
    border-radius:7px !important;
    background:#0a1014 !important;
}

.thumb-item.active{
    border-color:#edb84a !important;
    box-shadow:0 0 16px rgba(235,171,51,.25) !important;
}

.thumb-item canvas{
    width:100% !important;
    height:auto !important;
    border:2px solid rgba(236,225,199,.84) !important;
    border-radius:3px !important;
    background:#d9ceb0 !important;
}

.reader-center{
    height:100% !important;
    border:1px solid rgba(220,151,44,.75) !important;
    border-radius:14px !important;
    overflow:hidden !important;
    background:linear-gradient(180deg, rgba(5,10,13,.985), rgba(4,9,12,.995)) !important;
    box-shadow:0 20px 58px rgba(0,0,0,.48) !important;
}

.reader-toolbar{
    box-sizing:border-box !important;
    flex:0 0 7.66vh !important;
    min-height:66px !important;
    max-height:76px !important;
    border-bottom:1px solid rgba(221,153,43,.24) !important;
    background:
        radial-gradient(ellipse at 50% -60%, rgba(227,164,55,.07), transparent 60%),
        linear-gradient(180deg, rgba(8,14,17,.99), rgba(4,9,12,.99)) !important;
}

.toolbar-main{
    min-height:100% !important;
    gap:clamp(5px,.42vw,8px) !important;
}

.reader-icon{
    color:#e6ae3e !important;
}

.page-indicator{
    min-width:clamp(135px,10vw,170px) !important;
    border-color:rgba(223,154,43,.54) !important;
    color:#eee0c1 !important;
}

.book-stage{
    position:relative !important;
    flex:1 1 auto !important;
    width:100% !important;
    min-height:0 !important;
    padding:clamp(8px,.7vw,12px) !important;
    overflow:hidden !important;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(197,125,27,.09), transparent 44%),
        #070c0f !important;
}

.book-stage.official-spread-mode::after{
    content:"" !important;
    position:absolute !important;
    z-index:35 !important;
    pointer-events:none !important;
    inset:1.0% 1.2% 1.0% 1.2% !important;
    background:url("/assets/book-frame-v159.png?v=160") center center / 100% 100% no-repeat !important;
}

.book-stage.official-spread-mode{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:0 !important;
    align-items:stretch !important;
}

.book-stage.official-spread-mode .page-slot{
    width:100% !important;
    min-width:0 !important;
    height:100% !important;
    padding:1.6% 1.6% 1.8% !important;
    background:#0a0d0d !important;
}

.book-stage.official-spread-mode .right-page{
    padding-left:.4% !important;
}

.book-stage.official-spread-mode .left-page{
    padding-right:.4% !important;
}

.book-stage.official-spread-mode .book-spine{
    display:none !important;
}

.official-pdf-frame{
    position:relative !important;
    z-index:10 !important;
    width:100% !important;
    height:100% !important;
    border:0 !important;
    background:#d9cdae !important;
}

.reader-nav{
    height:100% !important;
    border:1px solid rgba(220,151,44,.76) !important;
    border-radius:14px !important;
    background:linear-gradient(180deg, rgba(4,11,15,.98), rgba(2,7,10,.995)) !important;
    box-shadow:0 18px 46px rgba(0,0,0,.43) !important;
}

.reader-nav-title{
    padding:27px 19px 16px !important;
}

.reader-nav-title h1{
    color:#e8b74e !important;
    font-size:clamp(24px,1.8vw,31px) !important;
}

.reader-section-button{
    border-color:rgba(216,148,41,.42) !important;
    background:rgba(6,13,17,.96) !important;
}

.reader-page-link{
    color:#dfbc6a !important;
}

.reader-page-link.active{
    color:#fff0bb !important;
    background:linear-gradient(90deg, rgba(211,140,28,.10), rgba(211,140,28,.27)) !important;
    border-color:rgba(230,166,52,.54) !important;
}

.premium-top,
.premium-top *,
.home-shell,
.home-shell *,
.library-shell,
.library-shell *,
.reader-grid,
.reader-grid *{
    pointer-events:auto !important;
}

body.premium-body::before,
body.premium-body::after,
.book-stage.official-spread-mode::after{
    pointer-events:none !important;
}

.reader-center:fullscreen,
.reader-center.native-fullscreen-active,
.reader-center.reader-css-fullscreen{
    width:100vw !important;
    height:100vh !important;
    max-width:none !important;
    max-height:none !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:#04090c !important;
}

.reader-center:fullscreen .reader-toolbar,
.reader-center.native-fullscreen-active .reader-toolbar,
.reader-center.reader-css-fullscreen .reader-toolbar{
    flex:0 0 66px !important;
}

.reader-center:fullscreen .book-stage,
.reader-center.native-fullscreen-active .book-stage,
.reader-center.reader-css-fullscreen .book-stage{
    height:calc(100vh - 66px) !important;
}

@media(min-width:2100px){
    .premium-top,
    .home-shell,
    .library-shell{
        width:min(var(--ref-header-width),1900px) !important;
    }

    .reader-grid{
        width:min(var(--ref-reader-width),1860px) !important;
    }
}

@media(max-width:1100px){
    :root{
        --ref-reader-left:4vw;
        --ref-reader-right:4vw;
        --ref-reader-width:92vw;
        --ref-header-left:4vw;
        --ref-header-right:4vw;
        --ref-header-width:92vw;
    }

    .premium-top{
        height:170px !important;
        min-height:170px !important;
    }

    .premium-brand{
        min-width:165px !important;
        max-width:190px !important;
    }

    .premium-brand::before{
        width:150px !important;
        height:150px !important;
    }

    .premium-brand img{
        width:100px !important;
        height:65px !important;
    }

    .reader-grid{
        height:calc(100dvh - 185px) !important;
        grid-template-columns:145px minmax(0,1fr) 230px !important;
    }

    body.premium-body::before{
        width:72px !important;
    }

    body.premium-body::after{
        width:44px !important;
    }
}

@media(max-width:900px){
    :root{
        --ref-reader-left:2vw;
        --ref-reader-right:2vw;
        --ref-reader-width:96vw;
        --ref-header-left:2vw;
        --ref-header-right:2vw;
        --ref-header-width:96vw;
    }

    body.premium-body{
        background-position:center top !important;
        background-size:auto 100vh !important;
        background-attachment:fixed !important;
    }

    body.premium-body::before,
    body.premium-body::after{
        display:none !important;
    }

    .premium-top{
        width:96vw !important;
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
        margin:0 2vw !important;
        padding-top:5px !important;
        display:block !important;
    }

    .premium-brand{
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
        height:82px !important;
        padding:0 !important;
        flex-direction:row !important;
        justify-content:center !important;
        gap:7px !important;
    }

    .premium-brand::before{
        display:none !important;
    }

    .premium-brand img{
        width:67px !important;
        height:52px !important;
        margin:0 !important;
    }

    .premium-brand span{
        font-size:20px !important;
    }

    .premium-nav{
        width:100% !important;
        height:52px !important;
        min-height:52px !important;
        max-height:52px !important;
        overflow-x:auto !important;
    }

    .premium-nav-link{
        min-height:50px !important;
        padding:0 14px !important;
        font-size:13px !important;
    }

    .home-shell,
    .library-shell{
        width:96vw !important;
        margin:12px 2vw 45px !important;
    }

    .reader-grid{
        width:96vw !important;
        height:calc(100dvh - 155px) !important;
        min-height:500px !important;
        margin:8px 2vw 10px !important;
        grid-template-columns:1fr !important;
        grid-template-areas:"nav" "center" !important;
        gap:7px !important;
    }

    .reader-thumbs{
        display:none !important;
    }

    .reader-nav{
        max-height:165px !important;
    }

    .reader-center{
        min-height:0 !important;
        height:auto !important;
    }

    .book-stage.official-spread-mode{
        display:block !important;
    }

    .book-stage.official-spread-mode::after{
        display:none !important;
    }

    .book-stage.official-spread-mode .left-page{
        display:none !important;
    }

    .book-stage.official-spread-mode .right-page{
        display:block !important;
        width:100% !important;
    }
}

/* END REFERENCE_MATCH_UI_1.5.9 */


/* BEGIN FINAL_UI_POLISH_1.6.0 */

html,
body {
    background:
        url('/assets/library-bg-base-v159.webp?v=161') center top / cover no-repeat fixed !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;
    background:
        url('/assets/library-bg-base-v159.webp?v=161') center top / cover no-repeat fixed;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 130px;
    pointer-events: none;
    z-index: -2;
    background:
        url('/assets/library-bg-base-v159.webp?v=161') center top / cover no-repeat;
}

header,
.site-header,
.library-header,
.page-header,
.hero-header,
.top-header,
.home-hero,
.hero-section,
.main-header,
.app-header,
.shell-header {
    margin-top: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    background: transparent !important;
}

.brand-area,
.site-brand,
.brand-badge,
.logo-badge,
.top-logo,
.library-logo,
.diamond-logo,
[class*="brand"],
[class*="logo"] {
    margin-top: 0 !important;
    top: 8px !important;
}

nav,
.main-nav,
.top-nav,
.nav-wrap,
.menu-wrap,
.tabs-wrap,
.header-tabs {
    margin-top: 0 !important;
}

.reader-toolbar button[title],
.reader-toolbar a[title],
.toolbar button[title],
.toolbar a[title],
[class*="toolbar"] button[title],
[class*="toolbar"] a[title] {
    position: relative;
}

.reader-toolbar button[title]:hover::after,
.reader-toolbar a[title]:hover::after,
.toolbar button[title]:hover::after,
.toolbar a[title]:hover::after,
[class*="toolbar"] button[title]:hover::after,
[class*="toolbar"] a[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    white-space: nowrap;
    background: rgba(7, 12, 18, 0.96);
    color: #e8c36c;
    border: 1px solid rgba(212, 162, 53, 0.7);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.25;
    z-index: 99999;
    box-shadow: 0 8px 22px rgba(0,0,0,.45);
    pointer-events: none;
}

.reader-toolbar button[title]:hover::before,
.reader-toolbar a[title]:hover::before,
.toolbar button[title]:hover::before,
.toolbar a[title]:hover::before,
[class*="toolbar"] button[title]:hover::before,
[class*="toolbar"] a[title]:hover::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    right: 50%;
    transform: translateX(50%);
    border: 6px solid transparent;
    border-top-color: rgba(212, 162, 53, 0.7);
    z-index: 100000;
    pointer-events: none;
}

button[data-hide-single-layout="1"],
a[data-hide-single-layout="1"] {
    display: none !important;
}

/* END FINAL_UI_POLISH_1.6.0 */

/* BEGIN FINAL_UI_HOTFIX_161 */
body.reader-page-active {
    background:
        url('/assets/library-bg-base-v159.webp?v=161') center top / cover no-repeat fixed,
        #040608 !important;
}

body.reader-page-active,
body.reader-page-active html,
body.reader-page-active .site-shell,
body.reader-page-active .page-shell,
body.reader-page-active .reader-page,
body.reader-page-active .reader-shell,
body.reader-page-active .reader-layout,
body.reader-page-active .reader-frame,
body.reader-page-active .reader-stage,
body.reader-page-active main {
    background-color: transparent !important;
}

body.reader-page-active header,
body.reader-page-active .site-header,
body.reader-page-active .page-header,
body.reader-page-active .header-wrap,
body.reader-page-active .top-header,
body.reader-page-active .hero-banner,
body.reader-page-active .home-hero,
body.reader-page-active .landing-hero,
body.reader-page-active .page-hero,
body.reader-page-active .reader-hero,
body.reader-page-active .header-hero {
    background-color: transparent !important;
    box-shadow: none !important;
}

body.reader-page-active .hero-banner,
body.reader-page-active .home-hero,
body.reader-page-active .landing-hero,
body.reader-page-active .page-hero,
body.reader-page-active .reader-hero,
body.reader-page-active .header-hero {
    background-image: url('/assets/library-bg-base-v159.webp?v=161') !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

body.reader-page-active .reader-main,
body.reader-page-active .reader-center,
body.reader-page-active .pdf-stage,
body.reader-page-active .pdf-host,
body.reader-page-active .viewer-host,
body.reader-page-active .book-frame-host,
body.reader-page-active iframe[src*="viewer.html"],
body.reader-page-active iframe[src*="viewer.htm"] {
    min-height: calc(100svh - 225px) !important;
    height: calc(100svh - 225px) !important;
}

body.reader-page-active .reader-spread-toggle,
body.reader-page-active .layout-toggle,
body.reader-page-active .spread-toggle,
body.reader-page-active .book-mode-toggle,
body.reader-page-active .display-mode-toggle,
body.reader-page-active [data-action="toggle-spread"],
body.reader-page-active [data-action="spread-mode"],
body.reader-page-active [data-action="book-mode"],
body.reader-page-active [data-action="layout-mode"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.reader-page-active .reader-toolbar button[title],
body.reader-page-active .reader-toolbar a[title],
body.reader-page-active [data-toolbar] button[title],
body.reader-page-active [data-toolbar] a[title] {
    position: relative;
}

body.reader-page-active .reader-toolbar button[title]:hover::after,
body.reader-page-active .reader-toolbar a[title]:hover::after,
body.reader-page-active [data-toolbar] button[title]:hover::after,
body.reader-page-active [data-toolbar] a[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    background: rgba(6, 10, 16, .96);
    color: #d8b15a;
    border: 1px solid rgba(216, 177, 90, .55);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    z-index: 9999;
}

@media (max-width: 900px) {
    body.reader-page-active .reader-main,
    body.reader-page-active .reader-center,
    body.reader-page-active .pdf-stage,
    body.reader-page-active .pdf-host,
    body.reader-page-active .viewer-host,
    body.reader-page-active .book-frame-host,
    body.reader-page-active iframe[src*="viewer.html"],
    body.reader-page-active iframe[src*="viewer.htm"] {
        min-height: calc(100svh - 185px) !important;
        height: calc(100svh - 185px) !important;
    }
}
/* END FINAL_UI_HOTFIX_161 */


/* BEGIN FINAL_UI_1.6.4 */

/* ==========================================================
   1. TOP AREA - SAME LIBRARY PHOTO AS THE REST OF THE SCREEN
   ========================================================== */

html,
body.premium-body {
    background-color:#020507 !important;
}

body.premium-body {
    background-image:
        url("/assets/library-bg-base-v159.webp?v=164") !important;

    background-position:
        center top !important;

    background-repeat:
        no-repeat !important;

    background-size:
        cover !important;

    background-attachment:
        fixed !important;
}

/*
 * This is the exact element producing the black area.
 * Use the SAME fixed viewport background so the books continue
 * seamlessly through the header.
 */
body.premium-body > header.premium-top,
header.premium-top {
    background-color:
        transparent !important;

    background-image:
        linear-gradient(
            180deg,
            rgba(0,0,0,.08),
            rgba(0,0,0,.18)
        ),
        url("/assets/library-bg-base-v159.webp?v=164") !important;

    background-position:
        center top,
        center top !important;

    background-repeat:
        no-repeat,
        no-repeat !important;

    background-size:
        cover,
        cover !important;

    background-attachment:
        fixed,
        fixed !important;

    box-shadow:
        none !important;
}

/* Keep only the intended logo/nav layers above the photograph. */
header.premium-top .premium-brand,
header.premium-top .premium-nav {
    position:relative !important;
    z-index:20 !important;
}

/* ==========================================================
   2. REMOVE TWO-PAGE/SPREAD BUTTON COMPLETELY
   ========================================================== */

#spreadBtn {
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;

    width:0 !important;
    min-width:0 !important;
    max-width:0 !important;

    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;

    margin:0 !important;
    padding:0 !important;
    border:0 !important;

    overflow:hidden !important;
    pointer-events:none !important;
}

/* ==========================================================
   3. SINGLE PAGE = FULL READER WIDTH
   ========================================================== */

#bookStage.official-single-mode,
.book-stage.official-single-mode {
    display:block !important;
    grid-template-columns:1fr !important;
}

#bookStage.official-single-mode #rightPage,
.book-stage.official-single-mode #rightPage {
    display:block !important;

    width:100% !important;
    max-width:100% !important;

    height:100% !important;

    margin:0 !important;
    padding:8px !important;
}

#bookStage.official-single-mode #leftPage,
.book-stage.official-single-mode #leftPage {
    display:none !important;
}

#bookStage.official-single-mode .book-spine,
.book-stage.official-single-mode .book-spine {
    display:none !important;
}

.official-pdf-frame {
    display:block !important;

    width:100% !important;
    height:100% !important;

    max-width:100% !important;

    margin:0 auto !important;

    border:0 !important;
}

/* ==========================================================
   4. PROFESSIONAL TOOLTIP
   ========================================================== */

.reader-toolbar button[data-tip] {
    position:relative !important;
}

.reader-toolbar button[data-tip]:hover::after {
    content:attr(data-tip);

    position:absolute !important;
    z-index:999999 !important;

    bottom:calc(100% + 9px) !important;
    left:50% !important;

    transform:translateX(-50%) !important;

    padding:7px 10px !important;

    direction:rtl !important;
    white-space:nowrap !important;

    color:#f2d28b !important;

    background:
        rgba(4,10,14,.98) !important;

    border:
        1px solid
        rgba(220,161,56,.78) !important;

    border-radius:
        8px !important;

    font-size:
        12px !important;

    font-weight:
        600 !important;

    line-height:
        1.2 !important;

    box-shadow:
        0 8px 24px
        rgba(0,0,0,.52) !important;

    pointer-events:none !important;
}

.reader-toolbar button[data-tip]:hover::before {
    content:"";

    position:absolute !important;
    z-index:1000000 !important;

    bottom:calc(100% + 3px) !important;
    left:50% !important;

    transform:translateX(-50%) !important;

    border:
        6px solid
        transparent !important;

    border-top-color:
        rgba(220,161,56,.78) !important;

    pointer-events:none !important;
}

/* ==========================================================
   5. MOBILE
   ========================================================== */

@media(max-width:900px) {

    body.premium-body,
    body.premium-body > header.premium-top,
    header.premium-top {
        background-position:
            center top !important;

        background-size:
            auto 100vh !important;

        background-attachment:
            scroll !important;
    }

    #bookStage,
    .book-stage {
        display:block !important;
    }

    #leftPage {
        display:none !important;
    }

    #rightPage {
        display:block !important;

        width:100% !important;
        max-width:100% !important;
    }
}

/* END FINAL_UI_1.6.4 */


/* BEGIN ZOOM_CONTROL_1.6.6 */

.zoom-select {
    height:38px !important;

    min-width:82px !important;

    padding:
        0
        10px !important;

    direction:rtl !important;

    text-align:center !important;

    color:#e8c36b !important;

    background:
        linear-gradient(
            180deg,
            rgba(12,18,22,.98),
            rgba(4,9,12,.98)
        ) !important;

    border:
        1px solid
        rgba(218,158,50,.58) !important;

    border-radius:
        7px !important;

    font-size:
        13px !important;

    font-weight:
        600 !important;

    cursor:
        pointer !important;

    outline:
        none !important;
}

.zoom-select:hover,
.zoom-select:focus {
    border-color:
        #e1aa3d !important;

    box-shadow:
        0 0 0 1px
        rgba(225,170,61,.18) !important;
}

.zoom-select option {
    color:#ead49c !important;

    background:#071015 !important;
}

@media(max-width:900px) {

    .zoom-select {
        min-width:68px !important;

        width:68px !important;

        padding:
            0
            4px !important;

        font-size:
            11px !important;
    }
}

/* END ZOOM_CONTROL_1.6.6 */

/* BEGIN ZOOM_TOOLTIP_FINAL_169 */

/*
 * Disable all old pseudo tooltips.
 * The new tooltip lives directly under body and cannot be clipped.
 */
.reader-toolbar button::before,
.reader-toolbar button::after,
.reader-toolbar a::before,
.reader-toolbar a::after,
.reader-toolbar select::before,
.reader-toolbar select::after {
    display:none !important;
    content:none !important;
}

#rachamimGlobalTooltip {
    position:fixed !important;

    z-index:2147483647 !important;

    display:block !important;

    visibility:hidden !important;
    opacity:0 !important;

    pointer-events:none !important;

    direction:rtl !important;

    max-width:280px !important;

    padding:
        8px
        12px !important;

    color:
        #f4d68d !important;

    background:
        rgba(4,9,13,.985) !important;

    border:
        1px solid
        rgba(222,166,59,.82) !important;

    border-radius:
        8px !important;

    font-size:
        13px !important;

    font-weight:
        600 !important;

    line-height:
        1.35 !important;

    white-space:
        nowrap !important;

    text-align:
        right !important;

    box-shadow:
        0 12px 32px
        rgba(0,0,0,.58) !important;

    transition:
        opacity .10s ease !important;
}

#rachamimGlobalTooltip.show {
    visibility:visible !important;
    opacity:1 !important;
}

/*
 * Make zoom control clearly readable.
 */
#zoomSelect,
.zoom-select,
.zoom-select-168 {
    min-width:92px !important;

    height:38px !important;

    padding:
        0
        28px
        0
        10px !important;

    color:
        #f0ca72 !important;

    background-color:
        #071015 !important;

    border:
        1px solid
        rgba(218,161,55,.72) !important;

    border-radius:
        8px !important;

    font-size:
        13px !important;

    font-weight:
        700 !important;

    text-align:center !important;

    direction:rtl !important;

    cursor:pointer !important;
}

#zoomSelect option,
.zoom-select option,
.zoom-select-168 option {
    color:#f0d28c !important;
    background:#071015 !important;
}

/*
 * New +/- zoom buttons.
 */
#readerZoomOut168,
#readerZoomIn168 {
    color:
        #e7b74c !important;

    background:
        transparent !important;

    border:
        0 !important;

    font-size:
        22px !important;

    cursor:pointer !important;
}

/* END ZOOM_TOOLTIP_FINAL_169 */


/* BEGIN ZOOM_DEDUP_174 */

/*
 * Legacy duplicate buttons from 1.6.8 must never appear.
 */
#readerZoomIn168,
#readerZoomOut168 {
    display:none !important;
}

/*
 * Keep only the native reader zoom controls.
 */
#zoomIn,
#zoomOut {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
}

/* END ZOOM_DEDUP_174 */
