.polycc-flipbook{
    --polycc-flipbook-bg:#1e2144;
    width:100%;
    max-width:1180px;
    margin:24px auto;
    border:1px solid rgba(15,23,42,.14);
    border-radius:6px;
    background:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.14);
    overflow:hidden;
}
.polycc-flipbook__toolbar{
    position:relative;
    z-index:5;
    display:flex;
    align-items:center;
    gap:8px;
    min-height:52px;
    padding:8px 12px;
    background:#2e3192;
    color:#fff;
}
.polycc-flipbook__toolbar button,
.polycc-flipbook__toolbar a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:38px;
    height:36px;
    padding:0 11px;
    border:0;
    border-radius:6px;
    background:#fff;
    color:#252765;
    font-weight:700;
    line-height:1;
    text-decoration:none;
    cursor:pointer;
}
.polycc-flipbook__toolbar button:hover,
.polycc-flipbook__toolbar a:hover{
    background:#f1f3ff;
}
.polycc-flipbook__toolbar button:focus-visible,
.polycc-flipbook__toolbar a:focus-visible,
.polycc-flipbook:focus-visible{
    outline:3px solid #7fa2ff;
    outline-offset:2px;
}
.polycc-flipbook__toolbar button:disabled{
    opacity:.45;
    cursor:not-allowed;
}
.polycc-flipbook__status{
    min-width:82px;
    text-align:center;
    font-weight:700;
}
.polycc-flipbook__spacer{
    flex:1;
}
.polycc-flipbook__stage{
    position:relative;
    display:flex;
    align-items:flex-start;
    justify-content:flex-start;
    height:var(--polycc-flipbook-height,760px);
    padding:20px;
    overflow:auto;
    background:var(--polycc-flipbook-bg);
    overscroll-behavior:contain;
}
.polycc-flipbook__book-shell{
    display:flex;
    flex-shrink:0;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:0;
    margin:auto;
}
.polycc-flipbook__book{
    width:100%;
    margin:auto;
    filter:drop-shadow(0 18px 24px rgba(0,0,0,.32));
}
.polycc-flipbook__book.stf__parent,
.polycc-flipbook__book .stf__wrapper,
.polycc-flipbook__book canvas{
    box-sizing:border-box;
}
.polycc-flipbook__book.stf__parent{
    /* PageFlip defaults to pan-y, which blocks native two-finger zoom. */
    touch-action:pan-y pinch-zoom;
}
.polycc-flipbook.is-zoomed .polycc-flipbook__book.stf__parent{
    touch-action:pan-x pan-y pinch-zoom;
}
.polycc-flipbook__page{
    overflow:hidden;
    background:#fff;
}
.polycc-flipbook__page img,
.polycc-flipbook__page canvas{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:fill;
    user-select:none;
    -webkit-user-select:none;
    pointer-events:none;
}
.polycc-flipbook__book canvas{
    display:block;
    max-width:none !important;
    max-height:none !important;
    background:#fff;
}
.polycc-flipbook__book .stf__wrapper.--landscape::after{
    position:absolute;
    z-index:20;
    top:1.5%;
    bottom:1.5%;
    left:50%;
    width:1px;
    content:"";
    pointer-events:none;
    background:rgba(15,23,42,.3);
    box-shadow:0 0 12px rgba(15,23,42,.35);
}
.polycc-flipbook__loading{
    position:absolute;
    z-index:30;
    inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:24px;
    background:rgba(255,255,255,.94);
    color:#252765;
    font-weight:700;
    text-align:center;
}
.polycc-flipbook__spinner{
    width:34px;
    height:34px;
    border:4px solid #dfe3f5;
    border-top-color:#2e3192;
    border-radius:50%;
    animation:polyccFlipbookSpin .8s linear infinite;
}
.polycc-flipbook.is-ready .polycc-flipbook__loading{
    display:none;
}
.polycc-flipbook.has-error .polycc-flipbook__spinner{
    display:none;
}
.polycc-flipbook.is-fullscreen,
.polycc-flipbook.is-fullscreen-fallback,
.polycc-flipbook:fullscreen{
    position:fixed;
    inset:0;
    z-index:999999;
    width:100%;
    height:100%;
    max-width:none;
    margin:0;
    border:0;
    border-radius:0;
    background:#fff;
}
.polycc-flipbook.is-fullscreen .polycc-flipbook__stage,
.polycc-flipbook.is-fullscreen-fallback .polycc-flipbook__stage,
.polycc-flipbook:fullscreen .polycc-flipbook__stage{
    height:calc(100vh - 52px);
    height:calc(100dvh - 52px);
}
@keyframes polyccFlipbookSpin{
    to{transform:rotate(360deg)}
}
@media (max-width:767px){
    .polycc-flipbook{
        margin:16px 0;
        border-right:0;
        border-left:0;
    }
    .polycc-flipbook__toolbar{
        flex-wrap:wrap;
        gap:5px;
        padding:7px 8px;
    }
    .polycc-flipbook__toolbar button,
    .polycc-flipbook__toolbar a{
        min-width:34px;
        height:34px;
        padding:0 9px;
        font-size:13px;
    }
    .polycc-flipbook__status{
        min-width:64px;
    }
    .polycc-flipbook__stage{
        height:min(var(--polycc-flipbook-height,760px), 70vh, 640px);
        height:min(var(--polycc-flipbook-height,760px), 70dvh, 640px);
        min-height:380px;
        padding:10px 8px;
    }
    .polycc-flipbook__book{
        filter:drop-shadow(0 12px 18px rgba(0,0,0,.28));
    }
    .polycc-flipbook__book .stf__wrapper.--portrait::after{
        display:none;
    }
    .polycc-flipbook.is-fullscreen .polycc-flipbook__stage,
    .polycc-flipbook.is-fullscreen-fallback .polycc-flipbook__stage,
    .polycc-flipbook:fullscreen .polycc-flipbook__stage{
        height:calc(100vh - 94px);
        height:calc(100dvh - 94px);
        min-height:0;
    }
}
@media (prefers-reduced-motion:reduce){
    .polycc-flipbook__book-shell{
        transition:none;
    }
    .polycc-flipbook__spinner{
        animation-duration:1.6s;
    }
}
