.book-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(7, 12, 18, 0.74);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.book-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.book-popup-overlay.is-visible .book-popup-dialog {
    opacity: 1;
    transform: translateY(0);
}

.book-popup-dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(270px, 0.72fr) minmax(390px, 1fr);
    align-items: stretch;
    gap: 34px;
    width: min(91vw, 900px);
    height: min(86vh, 640px);
    max-height: calc(100vh - 36px);
    padding: 14px 40px 14px 14px;
    overflow: hidden;
    overflow-x: hidden;
    border: 1px solid rgba(8, 37, 80, 0.08);
    border-radius: 16px;
    background: #fffaf5;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    text-align: left;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.book-popup-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #081b36;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    z-index: 3;
}

.book-popup-close:hover,
.book-popup-close:focus-visible {
    background: transparent;
    outline: 2px solid var(--primary-color, #1e40af);
    outline-offset: 2px;
}

.book-popup-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #eef6ff;
}

.book-popup-author-photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
}

.book-popup-photo-badge {
    position: absolute;
    left: 16px;
    bottom: 56px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(196, 225, 247, 0.32);
    border-radius: 9px;
    background: rgba(5, 31, 70, 0.74);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1.15;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.book-popup-badge-icon {
    font-size: 24px;
    line-height: 1;
}

.book-popup-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: 18px 0 0;
    background: transparent;
}

.book-popup-header {
    text-align: center;
}

.book-popup-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    color: #0e4f75;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.book-popup-kicker strong {
    display: inline-block;
    padding: 7px 15px;
    border-radius: 999px;
    background: #d8ebfb;
}

.book-popup-kicker span {
    color: #c79b42;
    font-size: 15px;
}

.book-popup-title {
    margin: 0 0 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(39px, 4.6vw, 55px);
    line-height: 1.05;
    color: #062653;
}

.book-popup-subtitle {
    margin: 0;
    color: #115b82;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(16px, 1.8vw, 20px);
    font-style: italic;
    font-weight: 600;
    line-height: 1.45;
}

.book-popup-heart {
    margin: 5px 0 14px;
    color: #c79b42;
    font-size: 15px;
}

.book-popup-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 205px;
    align-items: center;
    gap: 22px;
    margin-bottom: 12px;
}

.book-popup-text {
    margin: 0;
    color: #172136;
    font-size: 13.5px;
    line-height: 1.55;
}

.book-popup-cover {
    display: block;
    width: 100%;
    max-height: 235px;
    object-fit: contain;
    filter: drop-shadow(16px 16px 16px rgba(15, 23, 42, 0.18));
}

.book-popup-quote {
    margin: 0 0 11px;
    padding-top: 8px;
    border-top: 1px solid rgba(14, 79, 117, 0.16);
    color: #115b82;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.book-popup-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    align-items: stretch;
    z-index: 2;
    padding: 0;
    background: transparent;
}

.book-popup-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 43px;
    padding: 11px 20px;
    border-radius: 9px;
    border: 1.5px solid #092a55;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

.book-popup-cta-primary {
    background: #082550;
    color: #fff;
}

.book-popup-cta-secondary {
    background: transparent;
    color: #082550;
}

.book-popup-cta-primary:hover,
.book-popup-cta-primary:focus-visible {
    background: var(--primary-light, #2563eb);
    outline: 2px solid var(--primary-color, #1e40af);
    outline-offset: 2px;
}

.book-popup-cta-secondary:hover,
.book-popup-cta-secondary:focus-visible {
    background: var(--primary-soft, #eff6ff);
    outline: 2px solid var(--primary-color, #1e40af);
    outline-offset: 2px;
}

.book-popup-footer-text {
    margin: 9px 0 8px;
    color: #082550;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.book-popup-logos {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.book-popup-logo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    white-space: nowrap;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.book-popup-logo:hover,
.book-popup-logo:focus-visible {
    opacity: 1;
    transform: translateY(-1px);
}

.book-popup-logo img {
    display: block;
    width: auto;
    height: 20px;
}

.book-popup-logo--apple img {
    height: 18px;
}

.book-popup-logo--apple span {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    letter-spacing: -0.01em;
}

.book-popup-logo--gplay img {
    height: 20px;
}

.book-popup-logo--gplay span {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    letter-spacing: -0.01em;
}

body.book-popup-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .book-popup-overlay {
        padding: 1rem;
    }

    .book-popup-dialog {
        display: grid;
        grid-template-columns: 1fr;
        width: min(94vw, 520px);
        height: auto;
        max-height: 92vh;
        overflow-y: auto;
        text-align: center;
        padding: 12px;
        gap: 0;
    }

    .book-popup-media {
        width: 100%;
        min-height: 220px;
    }

    .book-popup-author-photo {
        height: 34vh;
        min-height: 0;
        object-fit: cover;
        object-position: center;
    }

    .book-popup-photo-badge {
        bottom: 14px;
    }

    .book-popup-content {
        padding: 1.45rem 0.35rem 0.5rem;
    }

    .book-popup-title {
        font-size: clamp(2rem, 10vw, 2.85rem);
    }

    .book-popup-text {
        margin-left: auto;
        margin-right: auto;
    }

    .book-popup-feature {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .book-popup-cover {
        max-height: 230px;
        max-width: 220px;
        margin: 0 auto;
    }

    .book-popup-actions {
        justify-content: center;
    }

    .book-popup-cta {
        width: 100%;
        min-width: 0;
    }
}
