.fbk-wrapper {
    max-width: 800px;
    margin: 1.5em auto;
}

.fbk-viewport {
    position: relative;
    width: 100%;
    max-height: 75vh;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    touch-action: manipulation;
    user-select: none;
}

.fbk-book {
    position: relative;
    width: 100%;
    height: 100%;
}

.fbk-page {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.fbk-page.fbk-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fbk-page-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.fbk-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 24px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    touch-action: manipulation;
    color: #333;
}

.fbk-nav:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}

.fbk-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.fbk-prev { left: 8px; display: none; }
.fbk-next { right: 8px; }

.fbk-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    font-size: 14px;
    color: #555;
    gap: 12px;
    flex-wrap: wrap;
}

.fbk-counter {
    font-weight: 600;
}

.fbk-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.fbk-download:hover {
    background: #135e96;
    color: #fff;
}

@media (max-width: 600px) {
    .fbk-viewport {
        max-height: 70vh;
        border-radius: 4px;
    }

    .fbk-nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
        line-height: 36px;
    }

    .fbk-prev { left: 4px; }
    .fbk-next { right: 4px; }

    .fbk-info {
        font-size: 13px;
        padding: 8px 2px;
    }

    .fbk-download {
        font-size: 12px;
        padding: 5px 12px;
    }
}

@media (min-width: 1200px) {
    .fbk-wrapper {
        max-width: 900px;
    }

    .fbk-nav {
        width: 52px;
        height: 52px;
        font-size: 28px;
        line-height: 52px;
    }

    .fbk-prev { left: 12px; }
    .fbk-next { right: 12px; }
}
