/* Keep the existing columns and typography; both cards fill their shared row.
 * Grid sizing follows the taller card automatically, including changing controls.
 * When responsive styles stack the cards, each keeps its natural content height.
 */
html body.single-book #inner-wrap .escore.esc-page-book .esc-bd-facts-row {
    align-items: stretch !important;
}
html body.single-book #inner-wrap .escore.esc-page-book .esc-bd-facts-row > :is(.esc-bd-facts, .esc-bd-journey) {
    align-self: stretch !important;
    height: auto !important;
    box-sizing: border-box;
}

/* Use the free space in Book details without adding another framed card. */
html body.single-book #inner-wrap .escore.esc-page-book .esc-bd-facts > .book-meta {
    height: auto;
}
html body.single-book #inner-wrap .escore.esc-page-book .esc-bd-facts > .ebl-availability-in-details {
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    margin: 16px 0 0 !important;
    padding: 12px 0 0 !important;
    border: 0;
    border-top: 1px solid #e7ddf2;
    border-radius: 0;
    box-shadow: none;
    background: none !important;
    gap: 16px;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-availability-in-details > .esc-icon {
    width: 64px !important;
    height: 64px !important;
    flex: 0 0 64px;
    padding: 0;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-availability-in-details .esc-bd-heading {
    font-size: 27px !important;
    margin-bottom: 6px !important;
}

html body.single-book #inner-wrap .escore.esc-page-book a.esc-bd-country {
    text-decoration: none !important;
    cursor: pointer;
}
html body.single-book #inner-wrap .escore.esc-page-book a.esc-bd-country:hover {
    background: #f7f0ff;
    border-color: #b899d0;
}
html body.single-book #inner-wrap .escore.esc-page-book a.esc-bd-country:focus-visible {
    outline: 2px solid #8055a4;
    outline-offset: 3px;
}

/* Keep description and tags in matching cards, with tags on the right. */
html body.single-book #inner-wrap .escore.esc-page-book .ebl-description-tags-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 14px;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-description-tags-row > .esc-bd-card {
    margin-bottom: 0 !important;
    height: auto !important;
    min-width: 0;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-book-tags .esc-bd-heading {
    font-size: 32px !important;
    margin: 10px 0 18px !important;
    text-align: center;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-book-tags .book-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-book-tags .tag {
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-book-tags .tag[hidden] {
    display: none !important;
}
html body.single-book #inner-wrap .escore.esc-page-book .ebl-book-tags .esc-bd-tag-toggle {
    flex-basis: 100%;
    margin-top: 6px;
    text-align: left;
}
html[data-escore-device="compact"] body.single-book #inner-wrap .escore.esc-page-book .ebl-description-tags-row {
    grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 760px) {
    html body.single-book #inner-wrap .escore.esc-page-book .ebl-description-tags-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Increase every term of the existing responsive trailer height by 20%. */
html body.single-book #inner-wrap .esc-page-book #esc-book-trailer .video-40-height {
    height: min(101.25cqw, clamp(324px, 64.8svh, 612px)) !important;
}

/* Portraits occupy 60% of their former width; their square frames scale with them. */
html body.single-book #inner-wrap .esc-page-book #esc-book-characters .esc-character-open {
    width: 60%;
    margin-inline: auto;
}
html body.single-book #inner-wrap .esc-page-book #esc-book-characters .esc-character-frame {
    padding: 3.6px;
    border-width: 1.2px;
    border-radius: 8.4px;
}
html body.single-book #inner-wrap .esc-page-book #esc-book-characters .esc-character-picture {
    border-width: 0.6px;
    border-radius: 4.8px;
}

/* Add two typographic points only within the two recommendation sections. */
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .esc-bd-heading {
    font-size: calc(28px + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .product-title {
    font-size: calc(14px + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) :is(.product-subtitle, .product-author, .product-genre) {
    font-size: calc(11px + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .rating-text {
    font-size: calc(13px + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .original-price {
    font-size: calc(0.9rem + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) :is(.sale-price, .current-price) {
    font-size: calc(1.1rem + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .discount-badge {
    font-size: calc(0.8rem + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .esc-bd-product-cta {
    font-size: calc(12px + 2pt) !important;
}
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .esc-bd-browse-link {
    font-size: calc(14px + 2pt) !important;
}
html[data-escore-device="compact"] body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .product-title {
    font-size: calc(13px + 2pt) !important;
}

/* Small helper text must remain at least 14px after the existing 80% zoom. */
html body.single-book #inner-wrap .esc-page-book :is(
    .esc-reading-date small,
    .esc-bd-rating-line small,
    .esc-share-feed small,
    .coauthor-item small,
    .form-group small,
    .elw-book-controls small,
    .ebl-reader-guide-eyebrow,
    .ebl-reader-guide h3
) {
    font-size: 17.5px !important;
}

/* Let recommendation titles retain two full lines at the larger minimum. */
html body.single-book #inner-wrap .esc-page-book :is(.esc-bd-related, .woocommerce-section) .product-title {
    font-size: 17.5px !important;
    line-height: 1.3;
    height: auto !important;
    min-height: 2.6em;
}
/* Keep illustrated review stars visibly selected after the pointer leaves.
   The page renderer's initial grey fill must not override the rating state. */
html body.single-book .esc-page-book #euonia-stars .euonia-star.active .esc-illustrated-star {
  fill: #e5c276 !important;
  stroke: #aa7f3c !important;
}
html body.single-book .esc-page-book #euonia-stars .euonia-star:focus-visible {
  outline: 2px solid #78518f !important;
  outline-offset: 3px;
  border-radius: 4px;
}
