/* Keep full titles readable, including words without spaces. */
body .entry-title,
body .page-title,
body .stk-block-posts__title,
body .bga-post-grid .wp-block-post-title {
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
}
body .hero-section .page-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.2;
}
body .entries > article,
body .stk-block-posts__item,
body .bga-post-grid .wp-block-post {
    min-width: 0;
}
body .entries .entry-title,
body .stk-block-posts__title,
body .bga-post-grid .wp-block-post-title {
    font-size: clamp(1.125rem, 1.5vw, 1.5rem);
    line-height: 1.35;
}
.bga-post-grid .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.bga-post-grid .wp-block-post-title { margin: 0 0 1rem; }
.bga-post-grid .wp-block-post-featured-image { margin: 0 0 1rem; }
.bga-post-grid .wp-block-post-featured-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}
.bga-post-grid .wp-block-post-excerpt { margin-block: 1rem; }
.bga-post-grid .wp-block-post-date,
.bga-post-grid .wp-block-post-terms { font-size: .875rem; }
.bga-post-grid .wp-block-query-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .75rem;
    margin-block: 2.5rem;
}
.bga-post-grid .wp-block-query-pagination-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin: 0;
}
.bga-post-grid .wp-block-query-pagination a,
.bga-post-grid .wp-block-query-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: .5rem .75rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    margin: 0;
}
.bga-post-grid .wp-block-query-pagination .current {
    background: #f08000;
    color: #fff;
}
.bga-post-grid .wp-block-query-pagination a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
@media (max-width: 999px) {
    .bga-post-grid .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .bga-post-grid .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
}

/* Comic library: scoped to the homepage components, independent of theme updates. */
.bga-comics-home {
    --bga-muted: #bfb1a8;
    --bga-accent: #f08000;
    color: #faf4ee;
}
body.home .hero-section { display: none; }
.bga-comics-home a { text-decoration: none; }
.bga-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    padding: clamp(1rem, 3vw, 3rem) 0 3.5rem;
}
.bga-eyebrow {
    color: #d66bff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1.8;
    margin: 0 0 1rem;
}
.bga-eyebrow > span:first-child {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: .4rem;
    border-radius: 50%;
    background: #d66bff;
}
body .bga-hero h1 {
    color: #faf4ee;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
    margin: 0 0 1.5rem;
}
.bga-hero h1 em { color: #f08000; font-style: normal; }
.bga-hero-description { max-width: 46ch; color: #bfb1a8; font-size: 1rem; line-height: 1.8; }
.bga-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin-top: 2rem; }
.bga-comics-home .bga-button { display: inline-flex; gap: 1.5rem; align-items: center; background: #f08000; color: #241309; font-size: .9rem; font-weight: 750; padding: .9rem 1.3rem; border-radius: 8px; min-height: 48px; }
.bga-comics-home .bga-button:hover { background: #ffad52; }
.bga-comics-home .bga-text-link { color: #eee0d5; font-size: .85rem; padding-block: .75rem; }
.bga-comics-home a:hover { color: #ffad52; }
.bga-comics-home a:focus-visible, .bga-post-grid a:focus-visible { outline: 2px solid #f08000; outline-offset: 5px; }
.bga-hero-note { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid #42332b; font-size: .72rem; color: #bfb1a8; }
.bga-hero-note span:first-child { letter-spacing: .12em; color: #eee5df; }
.bga-feature { min-width: 0; border: 1px solid #633323; border-radius: 20px; overflow: hidden; background: radial-gradient(ellipse at 85% 0, #f0300040 0, transparent 65%), #281b17; box-shadow: 0 24px 60px #0003; }
.bga-feature-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; color: #e5bcaa; font-size: .65rem; letter-spacing: .12em; }
.bga-pill { border: 1px solid #b95a2b; border-radius: 99px; padding: .35rem .7rem; color: #ffe1c7; text-transform: uppercase; }
.bga-feature-mark { padding: 1.5rem 1.5rem 2rem; color: #f08000; font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 900; letter-spacing: -.055em; line-height: .95; }
.bga-feature-mark > span { float: right; font-size: 1.5em; font-weight: 400; }
.bga-feature-content { padding: 1.5rem; background: #1b110fc9; border-top: 1px solid #633323; }
body .bga-feature h2 { margin: 0 0 1.5rem; font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.4; overflow-wrap: anywhere; }
.bga-feature h2 a { color: #faf4ee; }
.bga-feature-bottom { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; font-size: .8rem; color: #bfb1a8; }
.bga-feature-bottom a { color: #f08000; }
.bga-section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.bga-section-heading .bga-eyebrow { margin-bottom: .35rem; }
body .bga-section-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.035em; color: #faf4ee; margin: 0; }
.bga-collection-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.bga-collection-links > a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem; background: #231c19; border: 1px solid #42332b; border-radius: 10px; color: #eee5df; font-size: .85rem; overflow-wrap: anywhere; }
.bga-collection-links > a:hover { border-color: #f08000; background: #382018; }
.bga-collection-count { flex-shrink: 0; color: #c8a38f; font-size: .75rem; }
.bga-collection-count > span { margin-left: .6rem; }
.bga-latest-heading { padding-top: 3.5rem; }
.bga-section-caption { font-size: .85rem; color: #bfb1a8; }
#latest-chapters, #browse-collections, #all-collections { scroll-margin-top: 120px; }
body .bga-post-grid .wp-block-post-template { gap: 1.5rem; }
.bga-post-grid .wp-block-post { display: flex; flex-direction: column; background: #211b18; border: 1px solid #42332b; border-radius: 14px; overflow: hidden; }
body .bga-post-grid .wp-block-post-featured-image { margin: 0; background: #130f0d; }
body .bga-post-grid .wp-block-post-featured-image img { display: block; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 0; }
.bga-post-grid .wp-block-post > :not(.wp-block-post-featured-image) { margin-inline: 1.25rem; }
body .bga-post-grid .wp-block-post-terms { margin-top: 1.25rem; margin-bottom: .65rem; text-transform: uppercase; letter-spacing: .08em; font-size: .65rem; }
.bga-post-grid .wp-block-post-terms a { color: #d66bff; }
.bga-post-grid .wp-block-post-terms a:hover { color: #e8adff; }
body .bga-post-grid .wp-block-post-title { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.45; margin-bottom: 1rem; }
.bga-post-grid .wp-block-post-title a { color: #faf4ee; text-decoration: none; }
.bga-post-grid .wp-block-post-title a:hover { color: #f08000; }
.bga-post-grid .wp-block-post-date { margin-top: auto; padding-top: 1rem; padding-bottom: 1.25rem; border-top: 1px solid #42332b; color: #bfb1a8; font-size: .75rem; }
.bga-post-grid .wp-block-query-pagination { color: #eee0d5; }
.bga-post-grid .wp-block-query-pagination a { color: #eee0d5; border-color: #665044; background: #211b18; }
.bga-post-grid .wp-block-query-pagination a:hover { color: #f08000; border-color: #f08000; }
.bga-post-grid .wp-block-query-pagination .current { background: #f08000; color: #241309; border-color: #f08000; }
.bga-library-tools { border-top: 1px solid #42332b; padding-top: 2rem; margin-top: 2rem; }
.bga-library-tools h2 { font-size: 1.3rem; }
/* Explicit light controls keep native popup options readable across browsers. */
.bga-library-tools .wp-block-column { min-width: 0; }
.bga-library-tools label {
    display: block;
    margin-bottom: .65rem;
    color: #d66bff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.bga-library-tools select {
    --theme-form-field-background-initial-color: #fff7f0;
    --theme-form-field-background-focus-color: #fff7f0;
    --theme-form-text-initial-color: #291b14;
    --theme-form-text-focus-color: #291b14;
    color-scheme: light;
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 54px;
    padding: .85rem 3rem .85rem 1rem;
    background-color: #fff7f0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5 7.5 5 5 5-5' stroke='%23933cc0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    color: #291b14;
    border: 1px solid #dbc5b6;
    border-radius: 12px;
    box-shadow: 0 4px 16px #0002;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
}
.bga-library-tools select:hover {
    background-color: #fff7f0;
    color: #291b14;
    border-color: #f08000;
}
.bga-library-tools select:focus {
    background-color: #fff7f0;
    color: #291b14;
    border-color: #d66bff;
    outline: 2px solid #d66bff;
    outline-offset: 3px;
}
.bga-library-tools select option,
.bga-library-tools select optgroup {
    background-color: #fff7f0;
    color: #291b14;
}
@media (forced-colors: active) {
    .bga-library-tools select {
        appearance: auto;
        -webkit-appearance: auto;
        background-image: none;
    }
}
@media (max-width: 999px) {
    .bga-hero { gap: 2rem; }
    .bga-collection-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 689px) {
    .bga-hero { grid-template-columns: minmax(0, 1fr); padding-top: .5rem; }
    body .bga-hero h1 { font-size: clamp(2rem, 7vw, 2.75rem); }
    .bga-feature-mark { font-size: 2rem; }
    .bga-collection-links { grid-template-columns: minmax(0, 1fr); }
    .bga-latest-heading { padding-top: 2.5rem; }
}
