/* Individual books. Typography, page width, and the shared shell belong to the original theme. */
.yb-detail { --yb-rule: #111; }
.yb-detail-navigation { margin: 0 0 1rem; font-size: max(16px, .9rem); }
.yb-detail a { text-decoration: underline; text-underline-offset: .12em; }
.yb-detail a:hover { text-decoration: none; }
.yb-detail a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.yb-detail-head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 1.5rem; padding: 1.5rem; border: 1px solid var(--yb-rule); margin: 0 0 2rem; }
.yb-detail-heading { grid-column: 2; grid-row: 1; min-width: 0; }
.yb-detail .page-title { font-size: 1.8rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 0; overflow-wrap: break-word; }
.yb-detail-lead { font-size: 1rem; line-height: 1.55; margin: 1rem 0 0; }
.yb-detail-cover { grid-column: 1; grid-row: 1; min-width: 0; margin: 0; text-align: center; }
.yb-detail-cover-image { max-width: 260px; margin: 0 auto; }
.yb-detail-cover img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; margin: 0; }
/* Preserve the approved front-cover windows for the three existing source images. */
.yb-detail-cover--era .yb-detail-cover-image { max-width: calc(360px * 942 / 1417); }
.yb-detail-cover--era img { aspect-ratio: 942 / 1417; object-fit: cover; object-position: right center; }
.yb-detail-cover--creative .yb-detail-cover-image { position: relative; overflow: hidden; aspect-ratio: 715 / 1010; max-width: calc(360px * 715 / 1010); }
.yb-detail-cover--anthology .yb-detail-cover-image { position: relative; overflow: hidden; aspect-ratio: 188 / 372; max-width: calc(360px * 188 / 372); }
.yb-detail-cover--creative img, .yb-detail-cover--anthology img { position: absolute; max-width: none; max-height: none; object-fit: fill; }
.yb-detail-cover--creative img { width: calc(100% * 1216 / 715); height: calc(100% * 1152 / 1010); left: calc(-100% * 250 / 715); top: calc(-100% * 43 / 1010); }
.yb-detail-cover--anthology img { width: calc(100% * 300 / 188); height: calc(100% * 400 / 372); left: calc(-100% * 75 / 188); top: calc(-100% * 14 / 372); }
.yb-detail-cover figcaption { font-size: max(14px, .8rem); line-height: 1.5; margin: .75rem 0 0; }
.yb-detail-head--text-only { display: block; }

.yb-detail-content { max-width: 65ch; }
.yb-detail-content > :first-child { margin-top: 0; }
.yb-detail-content > :last-child { margin-bottom: 0; }
.yb-detail-content h2 { font-size: 1.125rem; line-height: 1.3; font-weight: 600; padding-top: 1.25rem; border-top: 1px solid var(--yb-rule); margin: 2rem 0 1rem; }
.yb-detail-content h3 { font-size: 1rem; line-height: 1.4; font-weight: 600; margin: 1.5rem 0 .75rem; }
.yb-detail-content li + li { margin-top: .5rem; }
.yb-detail-content figure { margin-left: 0; margin-right: 0; }
.yb-detail-content img { max-width: 100%; height: auto; }
.yb-detail-content .kg-button-card { justify-content: flex-start; }
.yb-detail-content .kg-btn { font-family: inherit; font-size: max(16px, .9rem); line-height: 1.5; font-weight: 400; color: #111; background: #fff; border: 1px solid var(--yb-rule); border-radius: 0; padding: .5rem .8rem; text-decoration: none; }
.yb-detail-content .kg-btn:hover { color: #fff; background: #111; }

@media (max-width: 600px) {
    .yb-detail-head { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem; }
    .yb-detail-heading { grid-column: 1; grid-row: 1; }
    .yb-detail-cover { grid-column: 1; grid-row: 2; }
    .yb-detail-cover-image { max-width: 240px; }
    .yb-detail-cover--era .yb-detail-cover-image { max-width: calc(320px * 942 / 1417); }
    .yb-detail-cover--creative .yb-detail-cover-image { max-width: calc(320px * 715 / 1010); }
    .yb-detail-cover--anthology .yb-detail-cover-image { max-width: calc(320px * 188 / 372); }
    .yb-detail-cover:not(.yb-detail-cover--creative):not(.yb-detail-cover--anthology) img { max-height: 320px; }
    .yb-detail .page-title { font-size: 1.6rem; }
}
