.main-bottom.card:has(.mol-toplists) {
    overflow: hidden;
}

.main-bottom.card:has(.mol-toplists) > .card-body {
    padding: 0;
}

.mol-toplists {
    --mol-blue: #4ca4d6;
    --mol-blue-dark: #23688d;
    --mol-border: #dfe3e7;
    --mol-focus: #111111;
    --mol-green: #3f842e;
    --mol-magenta: #c44983;
    --mol-muted: #5d6570;
    --mol-orange: #f27022;
    --mol-soft: #f6f7f8;
    --mol-text: #111827;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    color: var(--mol-text);
    display: grid;
    font-family: inherit;
    margin-inline: auto;
    max-width: 100%;
    overflow: hidden;
    width: 100%;
}

.mol-toplists a:focus-visible,
.mol-toplists button:focus-visible,
.mol-toplists input:focus-visible {
    outline: 3px solid var(--mol-focus);
    outline-offset: 3px;
}

.mol-toplists__hero {
    align-items: center;
    background: #f7f7f7;
    border-bottom: 1px solid var(--mol-border);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(120px, 165px) minmax(220px, 1fr) minmax(120px, 156px) minmax(190px, 238px);
    min-height: 120px;
    padding: 1.15rem clamp(1rem, 4vw, 3.25rem);
}

.mol-toplists__libra,
.mol-toplists__catalogue {
    align-items: center;
    display: inline-flex;
    min-width: 0;
    text-decoration: none;
}

.mol-toplists__libra img {
    display: block;
    height: auto;
    max-height: 42px;
    max-width: 135px;
    width: 100%;
}

.mol-toplists__catalogue {
    align-self: stretch;
    border-left: 1px solid var(--mol-border);
    color: #312783;
    font-weight: 800;
    gap: .75rem;
    justify-content: center;
    padding-left: clamp(1rem, 3vw, 2.2rem);
}

.mol-toplists__catalogue img {
    display: block;
    height: auto;
    max-height: 48px;
    width: 60px;
}

.mol-toplists__catalogue span {
    line-height: 1.1;
    white-space: nowrap;
}

.mol-toplists__catalog-search {
    display: grid;
    min-width: 0;
}

.mol-toplists__search-label {
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.mol-toplists__catalog-search input {
    background: #ffffff;
    border: 1px solid #d7dce1;
    border-radius: 8px;
    color: var(--mol-text);
    font: inherit;
    font-size: 1rem;
    min-height: 54px;
    min-width: 0;
    padding: 0 1.55rem;
}

.mol-toplists__catalog-search input::placeholder {
    color: #b7bdc4;
}

.mol-toplists__search-button {
    appearance: none;
    background: var(--mol-blue);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    min-height: 54px;
    padding: 0 1.8rem;
    text-transform: uppercase;
}

.mol-toplists__search-button:hover {
    background: var(--mol-blue-dark);
}

.mol-toplists__nav {
    align-items: end;
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 1rem clamp(1rem, 4vw, 4rem) .65rem;
}

.mol-toplists__external-note {
    background: #f1f3f5;
    border-bottom: 1px solid #e1e5e9;
    border-top: 1px solid #e1e5e9;
    color: var(--mol-muted);
    font-size: .88rem;
    line-height: 1.35;
    margin: 0;
    padding: .7rem clamp(.75rem, 2vw, 1rem);
    text-align: center;
}

.mol-toplists__tab {
    align-items: center;
    appearance: none;
    background: #ffffff;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--mol-blue);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    gap: .6rem;
    font: inherit;
    font-size: .95rem;
    font-weight: 500;
    justify-content: center;
    min-height: 54px;
    min-width: clamp(180px, 18vw, 224px);
    padding: .75rem 1rem;
    transition: background-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.mol-toplists__tab:hover {
    background: color-mix(in srgb, currentColor 8%, #ffffff);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .05);
}

.mol-toplists__tab.is-active {
    background: color-mix(in srgb, currentColor 12%, #ffffff);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
    font-weight: 500;
}

.mol-toplists__tab.is-new {
    color: var(--mol-green);
}

.mol-toplists__tab.is-last {
    color: var(--mol-magenta);
}

.mol-toplists__tab.is-viewed {
    color: #009fe3;
}

.mol-toplists__tab.is-loaned {
    color: var(--mol-orange);
}

.mol-toplists__tab-icon {
    display: inline-block;
    flex: 0 0 auto;
    height: 20px;
    width: 20px;
}

img.mol-toplists__tab-icon {
    object-fit: contain;
}

.mol-toplists__group {
    display: grid;
    gap: 0;
    padding: 0 clamp(1rem, 4vw, 4rem) 2rem;
}

.mol-toplists__group[hidden] {
    display: none;
}

.mol-toplists__heading {
    height: 1px;
    margin: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.mol-toplists__list {
    display: flex;
    gap: clamp(1rem, 2vw, 1.35rem);
    list-style: none;
    margin: 0;
    overflow-x: auto;
    padding: 0 0 1.2rem;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.mol-toplists__item {
    display: grid;
    flex: 0 0 clamp(140px, 15vw, 168px);
    gap: .6rem;
    min-width: 0;
    scroll-snap-align: start;
}

.mol-toplists__item.is-hidden {
    display: none;
}

.mol-toplists__cover-link {
    border-radius: 4px;
    display: block;
    width: 100%;
}

.mol-toplists__cover {
    aspect-ratio: 2 / 3;
    background: #d8d8d8;
    border: 1px solid #d8dde3;
    border-radius: 4px;
    box-shadow: 14px 14px 26px rgba(0, 0, 0, .1);
    display: block;
    height: auto;
    object-fit: cover;
    transition: border-color .16s ease, box-shadow .16s ease;
    width: 100%;
}

.mol-toplists__cover-link:hover .mol-toplists__cover,
.mol-toplists__cover-link:focus .mol-toplists__cover {
    border-color: currentColor;
    box-shadow: 14px 14px 26px rgba(0, 0, 0, .12);
}

.mol-toplists__group.is-new .mol-toplists__cover-link {
    color: var(--mol-green);
}

.mol-toplists__group.is-last .mol-toplists__cover-link {
    color: var(--mol-magenta);
}

.mol-toplists__group.is-viewed .mol-toplists__cover-link {
    color: #009fe3;
}

.mol-toplists__group.is-loaned .mol-toplists__cover-link {
    color: var(--mol-orange);
}

.mol-toplists__body {
    display: grid;
    gap: .28rem;
    min-width: 0;
}

.mol-toplists__title {
    color: #000000;
    display: -webkit-box;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.12;
    overflow: hidden;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.mol-toplists__title:hover,
.mol-toplists__title:focus {
    text-decoration: underline;
    text-decoration-thickness: .08em;
    text-underline-offset: .16em;
}

.mol-toplists__meta,
.mol-toplists__isbn,
.mol-toplists__empty {
    color: #111827;
    font-size: .82rem;
    line-height: 1.2;
    margin: 0;
}

.mol-toplists__isbn {
    color: var(--mol-muted);
}

.mol-toplists__action {
    align-items: center;
    background: #ffffff;
    border: 1px solid #cfd5dc;
    border-radius: 999px;
    color: #374151;
    display: inline-flex;
    font-size: .82rem;
    font-weight: 500;
    justify-content: center;
    line-height: 1.15;
    margin-top: .25rem;
    min-height: 34px;
    padding: .45rem 1rem;
    text-decoration: none;
    width: max-content;
}

.mol-toplists__action:hover,
.mol-toplists__action:focus {
    background: #f8fafc;
    border-color: #9ca3af;
    color: #111827;
    text-decoration: none;
}

@media (max-width: 860px) {
    .mol-toplists__hero {
        grid-template-columns: minmax(110px, 1fr) minmax(160px, 1fr);
    }

    .mol-toplists__catalog-search {
        grid-column: 1 / -1;
        order: 3;
    }

    .mol-toplists__search-button {
        grid-column: 1 / -1;
        order: 4;
    }

    .mol-toplists__catalogue {
        border-left: 0;
        justify-content: flex-end;
        padding-left: 0;
    }
}

@media (max-width: 560px) {
    .mol-toplists__hero {
        grid-template-columns: 1fr;
    }

    .mol-toplists__catalogue {
        justify-content: flex-start;
    }

    .mol-toplists__nav {
        display: grid;
        gap: .6rem;
        overflow: visible;
        padding-block: 1rem;
    }

    .mol-toplists__tab {
        justify-content: flex-start;
        min-height: 48px;
        min-width: 0;
        width: 100%;
    }

    .mol-toplists__item {
        flex-basis: 112px;
        gap: 0;
    }

    .mol-toplists__body {
        display: none;
    }

    .mol-toplists__cover {
        box-shadow: 8px 8px 18px rgba(0, 0, 0, .1);
    }
}
