/* The library masthead and the game catalogue share a paper, ink and vermilion palette. */
body.editorial-portal {
    --paper: #fffaf2;
    --ink: #382d27;
    --rule: #cec8bb;
    --seal: #a0462a;
    --book-type: var(--library-typeface);
    color: var(--ink);
    background: var(--paper);
}
.editorial-portal .home-page--library {
    --library-ink: var(--ink);
    --library-paper: var(--paper);
    --library-line: var(--rule);
    background: var(--paper);
}
.editorial-portal .fml-main-header.site-header {
    background: #3a2c25;
    box-shadow: none;
    border-bottom: 2px solid #a94d39;
}
.editorial-portal .fml-main-header :is(.fml-login-link, .fml-register-cta) { border-radius: .65rem; }
@media (min-width: 1320px) {
    .editorial-portal .fml-main-header .site-header__inner { max-width: 1240px; }
    .editorial-portal .fml-main-header .fml-header-account {
        display: grid;
        grid-template-columns: auto auto;
        gap: 2px 7px;
        max-width: none;
        align-items: center;
    }
    .editorial-portal .fml-main-header .fml-header-account small {
        grid-column: 1;
        grid-row: 2;
        max-width: none;
        white-space: nowrap;
    }
    .editorial-portal .fml-main-header .fml-login-link { grid-area: 1 / 2; }
}

/* The library illustration leaves room for the masthead on its left. */
.editorial-portal .home-page--library .hero-visual {
    display: grid;
    align-items: center;
    width: min(calc(100% - 48px), 1160px);
    min-height: 0;
    margin: clamp(1rem, 2.5vw, 2rem) auto;
    border: 1px solid var(--rule);
    border-radius: .85rem;
    background: #f1e6d2;
    box-shadow: none;
}
.editorial-portal .home-page--library .hero-visual__bg {
    position: absolute;
    inset: 0;
    background-position: right center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: none;
    transform: none;
    opacity: 1;
}
.editorial-portal .home-page--library .hero-visual__scrim { display: none; }
.editorial-portal .home-page--library .hero-visual__inner {
    justify-content: flex-start;
    text-align: left;
    min-height: clamp(20rem, 39vw, 29rem);
    width: 100%;
    max-width: none;
    padding: clamp(.8rem, 3vw, 2.5rem);
}
.editorial-portal .home-page--library .hero-visual__content {
    width: min(48%, 30rem);
    padding: clamp(.9rem, 2.1vw, 1.8rem);
    background: rgba(255, 249, 239, .92);
    color: var(--ink);
    border: 1px solid #fff9ef;
    border-radius: .85rem;
    backdrop-filter: none;
    box-shadow: 0 5px 24px #382d2724;
    text-shadow: none;
}
.editorial-portal .home-page--library .hero-visual__eyebrow {
    display: block;
    color: var(--seal) !important;
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    font: 700 .78rem/1.35 var(--book-type);
    font-size-adjust: from-font;
    letter-spacing: .18em;
    text-shadow: none;
}
.editorial-portal .home-page--library .hero-visual__title {
    font: 700 clamp(1.75rem, .4rem + 3vw, 3.35rem)/1.27 var(--book-type);
    letter-spacing: -.015em;
    color: var(--ink) !important;
    text-shadow: none;
    margin: .18em 0 .22em;
    overflow-wrap: anywhere;
}
.editorial-portal .home-page--library .hero-visual__title br { display: initial; }
.editorial-portal .home-page--library .hero-visual__lead {
    font-size: .95rem;
    color: #514b46 !important;
    text-shadow: none;
    margin: 0 0 1rem;
}
.editorial-portal .home-page--library .hero-visual__button {
    border-radius: .65rem;
    box-shadow: none;
    text-shadow: none;
}
.editorial-portal .home-page--library .hero-visual__button--primary {
    background: var(--seal);
    border-color: var(--seal);
    color: white;
}
.editorial-portal .home-page--library .hero-visual__button--primary:hover { background: #722c20; }
.editorial-portal .home-page--library .hero-visual__button--secondary {
    color: var(--ink);
    min-height: 44px;
}
@media (min-width: 1320px) and (max-width: 1390px) {
    .editorial-portal .fml-main-header .site-header__logo { width: 245px; }
}
.editorial-portal .home-page--library .hero-visual:not(:has(.hero-visual__bg[style])) .hero-visual__inner {
    min-height: 0;
}
.editorial-portal .home-page--library .hero-visual:not(:has(.hero-visual__bg[style])) .hero-visual__content {
    width: min(100%, 30rem);
}
.editorial-portal .home-page--library .hero-visual__bg:not([style]) { display: none; }

/* A spread of two fiction covers, with the book description beside each cover. */
.editorial-portal #novel-entry {
    border-block: 1px solid var(--rule);
    background: #f6eedf;
    padding-block: clamp(1.1rem, 2.1vw, 2rem);
}
.editorial-portal #novel-entry .container {
    width: min(calc(100% - 48px), 1160px);
    max-width: none;
    padding: 0;
    margin-inline: auto;
}
.editorial-portal .home-page--library :is(.cozy-section-heading, .home-section__heading) h2 {
    border: 0;
    padding-left: 0;
    font-family: var(--book-type);
    font-size: clamp(1.35rem, 1.05rem + 1vw, 1.85rem);
    letter-spacing: .02em;
}
.editorial-portal #novel-entry .cozy-section-heading { margin-bottom: .85rem; }
.editorial-portal #novel-entry .cozy-game-grid { gap: 1.5rem; }
.editorial-portal #novel-entry .cozy-game-tile {
    border: 0;
    padding: 0;
    background: none;
}
.editorial-portal #novel-entry .cozy-game-tile__link {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(.85rem, 1.5vw, 1.4rem);
}
.editorial-portal .home-page--library .cozy-game-tile__image,
.editorial-portal .home-page--library .cozy-game-tile__image img {
    width: 100%;
    border: 0;
    border-radius: 1px;
}
.editorial-portal #novel-entry .cozy-game-tile__image { aspect-ratio: 16 / 9; }
.editorial-portal #novel-entry .cozy-game-tile__body { display: block; padding: 0; }
.editorial-portal #novel-entry h3 { font: 700 clamp(1.15rem, 1rem + .8vw, 1.75rem)/1.45 var(--book-type); }
.editorial-portal #novel-entry p { margin: .4rem 0 0; color: #514b46; font-size: .9rem; line-height: 1.7; }
.editorial-portal #novel-entry a:hover h3,
.editorial-portal .game-archive .game-card__title a:hover { text-decoration: underline; text-underline-offset: .18em; }
.editorial-portal .home-page--library .home-popularity {
    border-radius: 0;
    border-width: 2px 0 0;
    border-color: var(--ink);
    background: #f6eedf !important;
}

/* Catalogue tabs, filter index and covers. */
.editorial-portal .game-archive .game-archive__header {
    padding-bottom: 1rem;
    margin-bottom: .8rem;
    border-bottom: 2px solid var(--ink);
}
.editorial-portal :is(.game-archive__header, .category-intro) h1 {
    font: 700 clamp(2.15rem, 1.6rem + 2.6vw, 4rem)/1.25 var(--book-type);
    letter-spacing: -.015em;
    margin-block: 0 .15em;
}
.editorial-portal .game-archive .game-shelf-links { gap: .2rem 1.25rem; margin-block: .25rem .65rem; }
.editorial-portal .game-archive .game-shelf-links a {
    background: transparent;
    color: var(--ink);
    padding-inline: .1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}
.editorial-portal .game-archive .game-shelf-links [aria-current="page"] { color: var(--seal); border-color: var(--seal); }
.editorial-portal .game-archive .game-search-form {
    border: 0;
    border-top: 2px solid var(--ink);
    background: #f6efe4;
    border-radius: 0;
    box-shadow: none;
}
.editorial-portal .catalog-filters { padding-block: .55rem; border-block: 1px solid var(--rule); margin-block: .8rem; }
.editorial-portal .catalog-filters > summary { cursor: pointer; font-weight: 650; padding-block: .65rem; }
.editorial-portal .catalog-filters[open] > summary { margin-bottom: .7rem; }
.editorial-portal .game-archive .game-search-form__actions button { border-radius: .65rem; }
.editorial-portal .game-archive .game-search-form__actions button:first-child {
    background: var(--seal);
    border-color: var(--seal);
    color: white;
}
.editorial-portal .game-archive .game-card, .editorial-portal .category-index-card {
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.editorial-portal .game-archive .game-card__thumb, .editorial-portal .category-index-card__image {
    border-radius: 1px;
    aspect-ratio: 16 / 9;
    height: auto;
    background: #ede9de;
}
.editorial-portal .game-archive .game-card__thumb img, .editorial-portal .category-index-card__image img { object-fit: contain; }
.editorial-portal .game-archive .game-card__body, .editorial-portal .category-index-card > div:last-child {
    padding: 1rem 0 1.2rem;
}
.editorial-portal .game-archive .game-card__title, .editorial-portal .category-index-card h2 {
    font: 700 1.25rem/1.55 var(--book-type);
}
.editorial-portal .game-archive .game-card__chips li {
    color: #524e46;
    background: none;
    min-height: 0;
    border: 0;
    border-inline-start: 1px solid var(--rule);
    border-radius: 0;
    padding: 0 .4rem;
}
.editorial-portal .category-library { background: var(--paper); color: var(--ink); }
.editorial-portal .category-index-card { border-top: 3px solid var(--category-accent); }

/* Pair the cover or gallery with the introduction when the CMS supplies one. */
.editorial-portal .game-detail-page--cozy-game .game-detail-main > .game-detail-card {
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
}
.editorial-portal .game-detail-page--cozy-game .game-detail-main > .game-detail-card:first-child {
    border: 0;
    border-top: 2px solid var(--seal);
    color: var(--ink);
    background: transparent;
    padding: 1.25rem 0;
}
.editorial-portal .game-detail-page--cozy-game .game-detail-card:first-child .game-detail-card__heading {
    font: 700 clamp(2rem, 1.5rem + 1.8vw, 3.25rem)/1.28 var(--book-type);
    color: var(--ink);
}
.editorial-portal .game-detail-page--cozy-game .game-detail-card:first-child :is(.game-description, .game-public-links__title) { color: var(--ink); }
.editorial-portal .game-detail-page--cozy-game .game-detail-card:first-child a { color: var(--seal); }
.editorial-portal .game-detail-page--cozy-game .game-detail-card:first-child .game-cta__btn--play {
    color: white !important;
    background: var(--seal);
    border-radius: .65rem;
}
.editorial-portal .game-detail-page--cozy-game .game-breadcrumbs { margin-bottom: 1rem; }
@media (min-width: 821px) {
    .editorial-portal .game-detail-page--cozy-game .game-detail-main:has(> .game-detail-card--slider) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        column-gap: clamp(1.5rem, 3vw, 3rem);
    }
    .editorial-portal .game-detail-page--cozy-game .game-detail-main:has(> .game-detail-card--slider) > .game-detail-card:first-child { grid-area: 1 / 1; }
    .editorial-portal .game-detail-page--cozy-game .game-detail-main > .game-detail-card--slider { grid-area: 1 / 2; }
    .editorial-portal .game-detail-page--cozy-game .game-detail-main:has(> .game-detail-card--slider) > .game-detail-card--meta { position: static; }
}
@media (max-width: 700px) {
    .editorial-portal .home-page--library .hero-visual {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "eyebrow" "title" "lead" "illustration";
        align-items: start;
        width: calc(100% - 40px);
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: var(--paper);
    }
    .editorial-portal .home-page--library :is(.hero-visual__inner, .hero-visual__content) {
        display: contents;
    }
    .editorial-portal .home-page--library .hero-visual__eyebrow {
        grid-area: eyebrow;
        margin: 0 0 .3rem;
        font-size: .7rem;
    }
    .editorial-portal .home-page--library .hero-visual__title {
        grid-area: title;
        margin: 0 0 .35rem;
        font-size: clamp(1.45rem, .25rem + 6.08vw, 2.25rem);
        text-wrap: balance;
    }
    .editorial-portal .home-page--library .hero-visual__title br { display: none; }
    .editorial-portal .home-page--library .hero-visual__lead {
        grid-area: lead;
        font-size: .9rem;
        line-height: 1.65;
        margin: 0 0 1rem;
        text-wrap: balance;
    }
    .editorial-portal .home-page--library .hero-visual__bg {
        grid-area: illustration;
        position: relative;
        inset: auto;
        width: 100%;
        aspect-ratio: 16 / 9;
        border: 1px solid var(--rule);
        border-radius: .85rem;
        background-color: #f1e6d2;
        background-position: center;
        background-size: contain;
    }
    .editorial-portal .home-page--library .hero-visual__actions {
        grid-area: illustration;
        position: relative;
        align-self: center;
        justify-self: start;
        align-items: stretch;
        flex-direction: column;
        flex-wrap: nowrap;
        max-width: calc(54% - .75rem);
        margin: .5rem 0 .5rem .75rem;
        gap: .5rem;
    }
    .editorial-portal .home-page--library .hero-visual__button {
        width: auto;
        min-height: 44px;
        padding: .45rem .65rem;
        text-align: center;
        justify-content: center;
        font-size: .85rem;
        white-space: normal;
        box-shadow: 0 2px 8px #382d272e;
    }
    .editorial-portal .home-page--library .hero-visual__button--secondary {
        background: #fff9ef;
        border-color: #ad8c72;
        color: var(--ink);
        text-decoration: none;
    }
    .editorial-portal .home-page--library .hero-visual__button--secondary:hover {
        background: #f3e6d7;
        color: var(--ink);
    }
    .editorial-portal .home-page--library .hero-visual:not(:has(.hero-visual__bg[style])) .hero-visual__actions {
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 100%;
        margin: 0;
    }
    .editorial-portal #novel-entry .container { width: calc(100% - 40px); }
    .editorial-portal #novel-entry .cozy-game-grid { gap: .85rem; }
    .editorial-portal #novel-entry .cozy-game-tile__link { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); min-height: 0; }
    .editorial-portal .category-index-card { align-items: center; gap: .8rem; }
    .editorial-portal .category-index-card__image { min-height: 0; }
}

.editorial-portal .home-page--library :is(.home-annex__copy strong, .home-news-card__image--placeholder span) {
    font-family: var(--library-typeface);
}
