/* Integration-only bridge between the original viewer shell and frozen StPageFlip. */
.ebook-book-gesture {
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    transition: none;
}

.ebook-book {
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.ebook-book .stf__parent {
    margin-inline: auto;
    transform: translateZ(0);
}

.ebook-book .stf__item {
    background: #fff;
    overflow: hidden;
}

.ebook-book .stf__item .ebook-page__image {
    object-fit: contain;
}

.ebook-book .stf__block {
    overflow: visible;
}

.ebook-book .ebook-page__loading,
.ebook-book .ebook-page__error {
    z-index: 2;
}

.ebook-book .ebook-text-layer,
.ebook-book .ebook-highlight-layer {
    z-index: 3;
}

.ebook-viewer--debug-highlight .ebook-page {
    outline: 2px solid rgba(0, 120, 255, 0.85);
    outline-offset: -2px;
}

.ebook-viewer--debug-highlight .ebook-page__image {
    outline: 2px dashed rgba(0, 170, 90, 0.9);
    outline-offset: -2px;
}

.ebook-viewer--debug-highlight .ebook-highlight-layer {
    outline: 2px dotted rgba(220, 90, 0, 0.95);
    outline-offset: -2px;
}

.ebook-debug {
    position: absolute;
    z-index: 20;
    right: 8px;
    bottom: 56px;
    left: 8px;
    margin: 0;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    color: var(--ebook-text-muted);
    font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}
