.bf-root {
    width: 100%;
    max-width: 1295px;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
    font-family: inherit;
    user-select: none;
}

.bf-book-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2696 / 1481;
    max-height: 709px;
}

.bf-book-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 0;
}

/* PageFlip container – sits exactly over the two page slots */
.bf-flipbook {
    position: absolute;
    top: 3.53%;
    bottom: 10.72%;
    left: 9.46%;
    right: 9.46%;
    z-index: 100;
}

/* StPageFlip internals */
.bf-flipbook .stf__parent {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
}
.bf-flipbook .stf__wrapper {
    position: absolute !important;
    inset: 0 !important;
}
.bf-flipbook .stf__block {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.bf-flipbook .stf__outerShadow,
.bf-flipbook .stf__innerShadow,
.bf-flipbook .stf__hardShadow,
.bf-flipbook .stf__hardInnerShadow {
    display: none !important;
}
.bf-flipbook .stf__item {
    border: none !important;
    outline: none !important;
}

/* Nav arrows – z-index 50, above bg, below flip */
.bf-btn {
    position: absolute;
    top: 46%;
    transform: translateY(-50%);
    z-index: 50;
    width: 69px;
    height: 69px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.88);
    box-shadow: 0 2px 14px rgba(0,0,0,.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow .15s, opacity .15s;
    color: #555;
}
.bf-btn-prev { left: 2%; }
.bf-btn-next { right: 2%; }
.bf-btn:hover:not(:disabled) { box-shadow: 0 4px 22px rgba(0,0,0,.22); }
.bf-btn:active:not(:disabled) { opacity: .8; }
.bf-btn:disabled { mopacity: .28; cursor: not-allowed; }
.bf-btn svg {
    width: 28px; height: 28px;
    fill: none; stroke: currentColor;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    display: block;
}

/* Spine dots – z-index 2, under the flip effect */
.bf-spine-dots {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
    pointer-events: none;
}
.bf-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #5a7fa8;
    border: 2px solid transparent;
    transition: background .15s, transform .15s;
    flex-shrink: 0;
    box-sizing: border-box;
    pointer-events: all;
    cursor: pointer;
}
.bf-dot:hover { background: #3a5f88; }
.bf-dot.is-first {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5a7fa8;
  border: 2px solid transparent;
  transition: background .15s, transform .15s;
  flex-shrink: 0;
  box-sizing: border-box;
  pointer-events: all;
  cursor: pointer;
}
.bf-dot.is-active {
    background: #e83e70 !important;
    border-color: rgba(255,255,255,.6) !important;
    transform: scale(1.3);
}

/* Lightbox */
.bf-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.bf-lightbox.open { display: flex; }
.bf-lightbox img {
    max-width: 90vw; max-height: 90vh;
    object-fit: contain; border-radius: 6px; display: block;
}
.bf-lb-close {
    position: absolute; top: 1.25rem; right: 1.5rem;
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.15); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.bf-lb-close:hover { background: rgba(255,255,255,.28); }
.bf-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.15); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.bf-lb-nav:hover { background: rgba(255,255,255,.28); }
.bf-lb-prev { left: 1.25rem; }
.bf-lb-next { right: 1.25rem; }
.bf-lb-close svg, .bf-lb-nav svg {
    width: 22px; height: 22px; fill: none; stroke: currentColor;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; display: block;
}

@media (max-width: 900px) {
    .bf-btn { width: 52px; height: 52px; }
    .bf-dot { width: 7px; height: 7px; }
    .bf-spine-dots { gap: 7px; }
}
@media (max-width: 540px) {
    .bf-btn { width: 38px; height: 38px; }
    .bf-btn svg { width: 20px; height: 20px; }
    .bf-dot { width: 5px; height: 5px; }
    .bf-spine-dots { gap: 5px; }
}
