/* Раздел «Авторы»: каталог, страница автора, хлебные крошки. Стиль общий с остальным сайтом:
   белый фон, чёрный текст, лаймовые акценты, мягкие светло-лиловые подложки. */

/* ---------- хлебные крошки ---------- */
.crumbs {
    margin: 0 0 20px;
}

.crumbs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 20px;
    color: #6b6b78;
}

.crumbs-item + .crumbs-item::before {
    content: "→";
    margin: 0 8px;
    color: #a0a0ad;
}

.crumbs-link {
    color: #4a4a55;
    text-decoration: underline;
    text-decoration-color: rgba(34, 34, 40, 0.25);
    text-underline-offset: 3px;
}

.crumbs-link:hover {
    color: #222228;
    text-decoration-color: #222228;
}

.crumbs-current {
    color: #222228;
    overflow-wrap: anywhere;
}

/* ---------- каталог авторов ---------- */
.authors-title,
.author-title {
    margin: 0 0 8px;
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.authors-lead {
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 26px;
    color: #4a4a55;
}

.authors-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    margin: 0 0 24px;
    padding: 4px 4px 4px 18px;
    background: #fff;
    border: 1.5px solid #222228;
    border-radius: 999px;
    transition: box-shadow .2s;
}

.authors-search:focus-within {
    box-shadow: 0 0 0 4px rgba(202, 239, 99, 0.75);
}

.authors-search-input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    font-size: 16px;
    color: #222228;
    background: transparent;
    border: 0;
    outline: none;
}

.authors-search-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #222228;
    background: #CAEF63;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.authors-search-btn:hover {
    background: #BDE352;
}

.authors-search-reset {
    margin: 0 12px 0 4px;
    font-size: 14px;
    color: #4a4a55;
}

.authors-status {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 24px;
    color: #4a4a55;
}

.authors-letter {
    margin: 28px 0 10px;
    font-size: 22px;
    line-height: 28px;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.authors-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    padding: 12px 16px;
    color: #222228;
    text-decoration: none;
    background: #F0F1F9;
    border-radius: 16px;
    transition: background-color .2s;
}

.authors-card:hover,
.authors-card:focus-visible {
    color: #222228;
    text-decoration: none;
    background: #E4F6B0;
}

.authors-card-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    overflow-wrap: anywhere;
}

.authors-card-count {
    font-size: 14px;
    line-height: 20px;
    color: #52535D;
}

.authors-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 32px;
}

.authors-pager-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    font-weight: 600;
    color: #222228;
    text-decoration: none;
    background: #F0F1F9;
    border-radius: 999px;
}

.authors-pager-link:hover {
    color: #222228;
    text-decoration: none;
    background: #E4F6B0;
}

.authors-pager-info {
    font-size: 14px;
    color: #6b6b78;
}

/* ---------- страница автора ---------- */
.author-title {
    margin-bottom: 16px;
}

.author-bio {
    max-width: 720px;
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 27px;
    color: #222228;
    white-space: pre-line;
}
.author-stats {
    max-width: 720px;
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 22px;
    color: #52535D;
}

.author-section-title {
    margin: 32px 0 6px;
    font-size: 26px;
    line-height: 32px;
}

.author-section-note {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 22px;
    color: #6b6b78;
}

.author-books {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.author-book {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: "cover head" "cover rest";
    column-gap: 18px;
    align-content: start;
    padding: 18px;
    background: #fff;
    border: 1px solid #E0E0EA;
    border-radius: 20px;
}

.author-book-cover {
    grid-area: cover;
}

.author-book-head {
    grid-area: head;
    min-width: 0;
}

.author-book-rest {
    grid-area: rest;
    min-width: 0;
}

.author-book-cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(34, 34, 40, 0.15);
}

.author-book-cover-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2 / 3;
    padding: 8px;
    font-size: 12px;
    line-height: 15px;
    text-align: center;
    color: #4a4a55;
    background: #F0F1F9;
    border-radius: 6px;
    overflow: hidden;
}

.author-book-title {
    margin: 0 0 2px;
    font-size: 20px;
    line-height: 26px;
    overflow-wrap: anywhere;
}

.author-book-title a {
    color: #222228;
    text-decoration: none;
}

.author-book-title a:hover {
    text-decoration: underline;
    text-decoration-color: #CAEF63;
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}

.author-book-meta {
    font-size: 15px;
    line-height: 22px;
    color: #52535D;
}

.author-book-text {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 24px;
}

.author-book-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 14px;
}

/* Кнопка всегда первая и стоит на одном месте у всех книг; ссылка на подборку — после неё; пометка о рекламе — отдельной строкой. */
.author-book-actions a.book-buy-btn {
    order: 1;
    flex: 0 0 auto;
}

.author-book-actions .book-ad-marking {
    order: 3;
    flex: 1 0 100%;
    margin: 0;
}

.author-book-link {
    order: 2;
    font-size: 15px;
    font-weight: 600;
    color: #222228;
    text-decoration: underline;
    text-decoration-color: #CAEF63;
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}

.author-collections {
    margin-top: 12px;
}

.book-author-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(34, 34, 40, 0.3);
    text-underline-offset: 3px;
}

.book-author-link:hover {
    color: #222228;
    text-decoration-color: #222228;
}

@media (max-width: 991.98px) {
    .authors-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .authors-title,
    .author-title {
        font-size: 30px;
        line-height: 38px;
    }

    .authors-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .authors-card {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }

    .authors-card-count {
        flex: 0 0 auto;
    }

    .author-book {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-areas: "cover head" "rest rest";
        column-gap: 14px;
        padding: 14px;
    }

    .author-book-rest {
        margin-top: 4px;
    }

    .author-book-actions a.book-buy-btn {
        width: 100%;
    }
}

/* Страница автора: подборки автора над списком, поиск, сортировка, группы */
.author-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 960px;
    margin: 0 0 8px;
}

.author-jump-label {
    font-size: 15px;
    font-weight: 600;
    color: #222228;
}

.author-jump-chip,
.author-jump-all {
    display: inline-block;
    max-width: 100%;
    padding: 6px 14px;
    overflow: hidden;
    font-size: 14px;
    line-height: 20px;
    color: #222228;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #E6F3C1;
    border-radius: 999px;
}

.author-jump-chip:hover {
    background: #CAEF63;
}

.author-jump-all {
    background: transparent;
    border: 1px solid #222228;
}

.author-jump-all:hover {
    background: #F0F1F9;
}

.author-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 18px;
}

.author-tools[hidden],
.author-empty[hidden],
.author-books[hidden],
.author-book[hidden] {
    display: none;
}

.author-filter-input {
    flex: 1 1 260px;
    max-width: 420px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 16px;
    color: #222228;
    background: #fff;
    border: 1.5px solid #222228;
    border-radius: 999px;
}

.author-filter-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(202, 239, 99, 0.75);
}

.author-sort-select {
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: #222228;
    background: #fff;
    border: 1.5px solid #222228;
    border-radius: 999px;
}

.author-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 15px;
    cursor: pointer;
}

.author-group-toggle input {
    width: 18px;
    height: 18px;
    accent-color: #222228;
}

.author-tools-count {
    font-size: 14px;
    color: #52535D;
}

.author-empty {
    margin: 0 0 18px;
    font-size: 16px;
    color: #4a4a55;
}

.author-empty-reset {
    padding: 0;
    font: inherit;
    color: #222228;
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}

.author-group {
    margin: 14px 0 -4px;
}

.author-group-title {
    margin: 0;
    font-size: 20px;
    line-height: 26px;
}

@media (max-width: 600px) {
    .author-filter-input {
        flex-basis: 100%;
        max-width: none;
    }
}
