@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');
:root{--ink:#101827;--gold:#d9ad57;--muted:#64748b;--paper:#f3f5f9;--line:#e1e7ef;--green:#48c99b}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:'DM Sans',Arial,sans-serif;color:var(--ink);background:var(--paper)}
[hidden]{display:none!important}
button,a{-webkit-tap-highlight-color:transparent}
.topbar{height:58px;background:#101827;color:white;display:flex;align-items:center;justify-content:space-between;padding:0 max(22px,calc((100vw - 1000px)/2));box-shadow:0 5px 20px #0b13221c}
.brand{display:flex;align-items:center;gap:10px;color:white;text-decoration:none;letter-spacing:1.4px;font-size:11px}
.brand-mark{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--gold);font-family:Georgia,serif;font-size:22px;color:var(--gold)}
.brand small{display:block;font-size:8px;letter-spacing:4px;color:var(--gold);margin-top:3px}
.top-status{display:flex;align-items:center;gap:9px;font-size:10px;color:#dce4f1}
.live-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);flex:none}
.icon-btn{background:transparent;border:1px solid #394559;border-radius:8px;color:white;width:34px;height:34px;font-size:22px;cursor:pointer;margin-left:8px}
.reader-shell{width:min(100% - 32px,1000px);margin:26px auto 50px}
.book-heading{display:flex;gap:20px;align-items:center;margin:0 0 22px}
.cover-placeholder{height:118px;width:88px;flex:none;border-radius:5px;background:radial-gradient(circle at 70% 15%,#254354,#101827 70%);box-shadow:0 10px 24px #11182722;color:#f6d28b;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;font-family:'Playfair Display',Georgia,serif;font-size:15px;line-height:1.05;position:relative;overflow:hidden}
.cover-placeholder:before{content:"";position:absolute;left:30%;top:-10px;width:1px;height:150px;background:#c9a45c66;transform:rotate(8deg)}
.cover-placeholder small{font:5px 'DM Sans',sans-serif;letter-spacing:1px;margin-top:12px;color:#e9d6a6}
.book-meta{min-width:0}.eyebrow{font-size:9px;font-weight:700;letter-spacing:2px;color:#b17d24;margin-bottom:8px}
.book-meta h1{font-size:clamp(23px,3.2vw,31px);line-height:1.2;margin:0 0 7px;font-weight:700;letter-spacing:-.7px}
.book-meta p{font-size:12px;color:var(--muted);margin:0 0 11px}
.pills{display:flex;gap:7px;flex-wrap:wrap}.pills span{font-size:9px;color:#526078;background:white;border:1px solid var(--line);padding:5px 9px;border-radius:20px}
.reader-card{border:1px solid var(--line);border-radius:16px;background:white;overflow:hidden;box-shadow:0 12px 40px #17203308}
.toolbar{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line);gap:12px}
.reading-state{display:flex;align-items:center;gap:8px;font-size:10px;font-weight:700;color:#344258}
.tools{display:flex;align-items:center;gap:8px}.tool-btn{min-width:32px;height:31px;border:1px solid #dbe2ec;border-radius:7px;background:white;color:#243249;cursor:pointer;font:500 12px 'DM Sans',sans-serif}
.tool-btn:disabled{opacity:.4;cursor:not-allowed}.page-indicator{font-size:10px;color:#536178;white-space:nowrap}.tool-divider{height:22px;border-left:1px solid var(--line);margin:0 3px}.fit-btn{padding:0 11px;font-size:10px}
.viewer{position:relative;min-height:480px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:22px 12px}
.loading-state,.error-state{min-height:420px;width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;text-align:center;padding:28px}
.loading-state strong,.error-state strong{font-size:14px}.loading-state span,.error-state span{font-size:11px;color:var(--muted);max-width:440px;overflow-wrap:anywhere}
.spinner{width:30px;height:30px;border:2px solid #e7ebf2;border-bottom-color:var(--gold);border-radius:50%;animation:spin .9s linear infinite;margin-bottom:3px}@keyframes spin{to{transform:rotate(360deg)}}
.error-symbol{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#fff1f1;color:#c24141;font-size:22px;font-weight:700}
.primary-btn{border:0;border-radius:8px;background:#152238;color:white;padding:11px 17px;font-weight:600;font-size:11px;cursor:pointer;text-decoration:none;margin-top:5px}
.flipbook-wrap{width:100%;display:flex;align-items:center;justify-content:center;min-height:320px;overflow:visible}
.flipbook{margin:0 auto;max-width:100%;touch-action:pan-y}
.flipbook .page{background:white;overflow:hidden}
.flipbook .page canvas{display:block;width:100%;height:100%;object-fit:contain}
.reader-footer{border-top:1px solid var(--line);padding:13px 17px;display:flex;justify-content:space-between;gap:10px;color:#8a96a9;font-size:8px;letter-spacing:.7px}
.privacy-note{text-align:center;font-size:10px;color:#8792a4;margin:15px 0}
.home-shell{width:min(100% - 36px,850px);margin:clamp(60px,12vh,130px) auto 40px}
.hero-badge{font-size:10px;font-weight:700;letter-spacing:2px;color:#ad7b29;margin-bottom:18px}
.home-shell h1{font-size:clamp(38px,7vw,68px);letter-spacing:-2px;line-height:1.05;margin:0 0 20px}.home-shell h1 span{font-family:'Playfair Display',Georgia,serif;color:#9a7335}
.home-shell>p{font-size:15px;line-height:1.8;color:var(--muted);max-width:540px}
.home-card{margin-top:34px;padding:20px;display:flex;gap:15px;align-items:center;background:white;border:1px solid var(--line);border-radius:14px;max-width:520px}
.home-icon{display:grid;place-items:center;width:44px;height:44px;background:#f8f1e3;color:#9a7335;border-radius:12px;font-size:23px}.home-card strong{font-size:13px}.home-card p{font-size:11px;color:var(--muted);margin:6px 0 0;line-height:1.6}
.home-shell footer{margin-top:70px;font-size:10px;color:#9aa4b3}
.message-page{min-height:100vh;display:grid;place-items:center;padding:20px}.message-card{background:white;border:1px solid var(--line);border-radius:16px;padding:32px;text-align:center;max-width:440px;box-shadow:0 15px 40px #1118270b}.message-card h1{font-size:24px}.message-card p{color:var(--muted);font-size:13px;line-height:1.7}.link-btn{display:inline-block}
@media(max-width:650px){.topbar{height:52px;padding:0 14px}.reader-shell{width:calc(100% - 20px);margin:18px auto 28px}.book-heading{align-items:flex-start;gap:13px;margin-bottom:16px}.cover-placeholder{width:72px;height:100px;font-size:12px}.book-meta h1{font-size:22px}.book-meta p{font-size:11px}.eyebrow{font-size:8px}.toolbar{padding:0 10px;height:48px}.reading-state{font-size:9px}.tools{gap:5px}.tool-btn{min-width:29px;height:29px}.fit-btn{padding:0 8px}.viewer{min-height:430px;padding:10px 2px}.loading-state,.error-state{min-height:390px}.reader-footer{font-size:7px;padding:12px 10px}.home-shell{margin-top:75px}.home-card{align-items:flex-start}}




/* ==========================================
   BLACK SPARROW — PROFESSIONAL READER TOOLBAR
   Paste at the VERY END of site.css
========================================== */

.reader-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(16, 24, 39, 0.07);
    overflow: hidden;
}

/* Toolbar */
.toolbar {
    min-height: 58px;
    height: auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
    border-bottom: 1px solid #e6ebf2;
}

.reading-state {
    color: #24334b;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

    /* All reader toolbar buttons */
    .tools .tool-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 1px solid #d7dfeb;
        border-radius: 9px;
        background: #fff;
        color: #23344e;
        font-family: 'DM Sans', Arial, sans-serif;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    }

        .tools .tool-btn:hover:not(:disabled) {
            background: #f1f5fb;
            border-color: #b9c7db;
            box-shadow: 0 3px 9px rgba(16, 24, 39, .07);
            transform: translateY(-1px);
        }

        .tools .tool-btn:active:not(:disabled) {
            transform: translateY(0);
        }

        .tools .tool-btn:focus-visible {
            outline: 3px solid rgba(59, 130, 246, .22);
            outline-offset: 2px;
        }

        .tools .tool-btn:disabled {
            opacity: .4;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }



/* Previous/next page indicator */
.page-indicator {
    min-width: 64px;
    text-align: center;
    color: #52627a;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.tool-divider {
    height: 27px;
    margin: 0 4px;
    border-left: 1px solid #dfe5ee;
}

/* Make Fit Page visually distinct */
.tools .fit-btn {
    background: #fff;
    border-color: #c7d3e3;
    color: #1e3a5f;
}

/* Optional: if your fullscreen button has this class */
.tools .fullscreen-btn {
    background: #c9953d;
    border-color: #c9953d;
    color: #fff;
}

    .tools .fullscreen-btn:hover:not(:disabled) {
        background: #ae7c2b;
        border-color: #ae7c2b;
    }

/* PDF viewing area — do not force a new page size */
.viewer {
    background: #f7f9fc;
    padding: 12px;
    min-width: 0;
}

/* Keep PageFlip's calculated dimensions intact */
#flipbookWrap,
.flipbook-wrap {
    min-width: 0;
    margin: 0 auto;
}

/* Footer */
.reader-footer {
    background: #fff;
    border-top: 1px solid #e6ebf2;
    color: #7b899d;
    font-size: 9px;
    letter-spacing: .45px;
}

/* Mobile toolbar */
@media (max-width: 650px) {
    .toolbar {
        padding: 10px;
        align-items: flex-start;
    }

    .reading-state {
        padding-top: 8px;
    }

    .tools {
        gap: 5px;
    }

        .tools .tool-btn {
            min-width: 32px;
            height: 33px;
            padding: 0 8px;
            font-size: 11px;
        }


    .page-indicator {
        min-width: 52px;
        font-size: 10px;
    }

    .tool-divider {
        margin: 0 1px;
    }

    .viewer {
        padding: 4px;
    }
}


/* Professional Zoom Controls — Black Sparrow Reader */

#zoomOutBtn,
#zoomInBtn,
#zoomResetBtn {
    height: 36px !important;
    min-width: 38px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border: 1px solid #d9e2ef !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    color: #24364f !important;
    font-family: 'DM Sans', Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(16, 24, 39, 0.04) !important;
    transition: all .2s ease !important;
}

#zoomOutBtn,
#zoomInBtn {
    font-size: 20px !important;
    font-weight: 400 !important;
    padding: 0 !important;
}

#zoomResetBtn {
    padding: 0 14px !important;
    background: #f5f8fc !important;
    border-color: #cbd8e8 !important;
    color: #24476f !important;
}

#zoomOutBtn:hover,
#zoomInBtn:hover {
    background: #edf4ff !important;
    border-color: #9bb8df !important;
    color: #174c91 !important;
    transform: translateY(-1px);
}

#zoomResetBtn:hover {
    background: #17283f !important;
    border-color: #17283f !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

#zoomOutBtn:active,
#zoomInBtn:active,
#zoomResetBtn:active {
    transform: translateY(0);
}

#zoomLevel {
    min-width: 54px !important;
    height: 36px !important;
    padding: 0 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5fa !important;
    border: 1px solid #e1e8f1 !important;
    border-radius: 9px !important;
    color: #17283f !important;
    font-family: 'DM Sans', Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 650px) {
    #zoomOutBtn,
    #zoomInBtn,
    #zoomResetBtn,
    #zoomLevel {
        height: 33px !important;
    }

    #zoomOutBtn,
    #zoomInBtn {
        min-width: 33px !important;
    }

    #zoomResetBtn {
        padding: 0 9px !important;
        font-size: 11px !important;
    }

    #zoomLevel {
        min-width: 45px !important;
    }
}




