@import url('assets/ao3-cover-fonts/fonts.css?v=1.0.0');
/* Dynamic novel jackets. Xiaolai reuses the calendar's already-loaded lazy family. */

.ao3-book-cover {
    --ao3-cover-ink: #fff9ed;
    --ao3-cover-ground: #253337;
    --ao3-cover-title-font: 'LoveMiAo3CoverSong', 'Songti SC', 'Noto Serif SC', serif;
    --ao3-cover-author-font: 'LoveMiAo3CoverKai', 'Kaiti SC', 'KaiTi', serif;
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    min-width: 0;
    flex: none;
    container-type: inline-size;
    isolation: isolate;
    overflow: hidden;
    border-radius: 3px 6px 6px 3px;
    background: var(--ao3-cover-ground);
    color: var(--ao3-cover-ink);
    text-align: left;
    box-shadow: 0 3px 7px rgba(24, 17, 31, .13);
    -webkit-user-select: none;
    user-select: none;
}

.ao3-book-cover__art,
.ao3-book-cover__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ao3-book-cover__art { object-fit: cover; }
.ao3-book-cover__shade {
    background: linear-gradient(180deg, rgba(16, 18, 23, .16), transparent 45%, rgba(12, 18, 24, .24));
    box-shadow: inset 3px 0 6px rgba(0, 0, 0, .12);
}

.ao3-book-cover__type,
.ao3-book-cover__title,
.ao3-book-cover__author {
    position: absolute;
    z-index: 1;
    display: block;
    box-sizing: border-box;
    min-width: 0;
    max-width: 84%;
    margin: 0;
    color: inherit;
    font-weight: 400;
    font-style: normal;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .24);
}

.ao3-book-cover__type {
    top: 6.5%;
    left: 9%;
    font-family: var(--ao3-cover-author-font);
    font-size: 10px;
    font-size: 7cqw;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .12em;
}

.ao3-book-cover__title {
    top: 20%;
    left: 9%;
    width: 82%;
    max-height: 57%;
    overflow: hidden;
    font-family: var(--ao3-cover-title-font);
    font-size: 26px;
    font-size: 23cqw;
    line-height: 1.12;
    letter-spacing: .025em;
    overflow-wrap: anywhere;
    word-break: normal;
    text-wrap: balance;
}

.ao3-book-cover__author {
    right: 9%;
    bottom: 7%;
    max-height: 14.5%;
    font-family: var(--ao3-cover-author-font);
    font-size: 10px;
    font-size: 7.3cqw;
    line-height: 1.4;
    text-align: right;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ao3-book-cover__by { font-size: .85em; }
.ao3-book-cover[data-title-size="regular"] .ao3-book-cover__title { font-size: 18cqw; }
.ao3-book-cover[data-title-size="medium"] .ao3-book-cover__title { font-size: 12cqw; line-height: 1.22; }
.ao3-book-cover[data-title-size="long"] .ao3-book-cover__title { font-size: 10.5cqw; line-height: 1.28; }

.ao3-book-cover[data-cover-layout="vertical"] .ao3-book-cover__title {
    top: 19%;
    left: auto;
    right: 12%;
    width: auto;
    max-width: 75%;
    height: 58%;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    line-height: 1.35;
    letter-spacing: .12em;
    text-wrap: wrap;
}

.ao3-book-cover[data-cover-layout="offset"] .ao3-book-cover__title { top: 26%; font-size: 21cqw; line-height: 1.2; }
.ao3-book-cover[data-cover-layout="offset"][data-title-size="regular"] .ao3-book-cover__title { font-size: 17cqw; }
.ao3-book-cover[data-cover-layout="offset"] .ao3-book-cover__title > span { display: block; }
.ao3-book-cover[data-cover-layout="offset"] .ao3-book-cover__title > span + span { margin-left: 16%; margin-top: .12em; }

.ao3-book-cover[data-cover-font="kai"] {
    --ao3-cover-title-font: 'LoveMiAo3CoverKai', 'Kaiti SC', 'KaiTi', serif;
    --ao3-cover-author-font: 'LoveMiCalendar', 'LoveMiCalendarNames', sans-serif;
}
.ao3-book-cover[data-cover-font="hand"] {
    --ao3-cover-title-font: 'LoveMiCalendar', 'LoveMiCalendarNames', sans-serif;
    --ao3-cover-author-font: 'LoveMiAo3CoverKai', 'Kaiti SC', 'KaiTi', serif;
}

.ao3-book-cover[data-cover-theme="ancient"] { --ao3-cover-ink: #3d3630; --ao3-cover-ground: #e4d9c2; }
.ao3-book-cover[data-cover-theme="campus"] { --ao3-cover-ink: #263e4b; --ao3-cover-ground: #c9e4e8; }
.ao3-book-cover[data-cover-theme="urban"] { --ao3-cover-ink: #f9f3e9; --ao3-cover-ground: #52636e; }
.ao3-book-cover[data-cover-theme="period"] { --ao3-cover-ink: #453d34; --ao3-cover-ground: #dbceb6; }
.ao3-book-cover[data-cover-theme="abo"] { --ao3-cover-ink: #fff1f1; --ao3-cover-ground: #664954; }
.ao3-book-cover[data-cover-theme="supernatural"] { --ao3-cover-ink: #ead9ba; --ao3-cover-ground: #223932; }
.ao3-book-cover[data-cover-theme="mystery"] { --ao3-cover-ink: #f0d7ad; --ao3-cover-ground: #302d36; }
.ao3-book-cover[data-cover-theme="infinite"] { --ao3-cover-ink: #f6ece0; --ao3-cover-ground: #3c354f; }
.ao3-book-cover[data-cover-theme="apocalypse"] { --ao3-cover-ink: #29372d; --ao3-cover-ground: #aab09a; }
.ao3-book-cover:is([data-cover-theme="ancient"], [data-cover-theme="campus"], [data-cover-theme="period"]) .ao3-book-cover__shade {
    background: linear-gradient(180deg, rgba(253, 248, 232, .12), transparent 55%, rgba(248, 240, 219, .18));
}
.ao3-book-cover:is([data-cover-theme="ancient"], [data-cover-theme="campus"], [data-cover-theme="period"]) :is(.ao3-book-cover__title, .ao3-book-cover__author, .ao3-book-cover__type) {
    text-shadow: 0 1px 2px rgba(255, 255, 255, .35);
}
.ao3-book-cover:is([data-cover-theme="ancient"], [data-cover-theme="period"]) .ao3-book-cover__shade {
    background: linear-gradient(180deg, rgba(253, 248, 232, .12), transparent 58%, rgba(37, 27, 18, .38));
}
.ao3-book-cover:is([data-cover-theme="ancient"], [data-cover-theme="period"], [data-cover-theme="apocalypse"]) .ao3-book-cover__author {
    color: #fff4df;
    text-shadow: 0 1px 3px rgba(23, 18, 12, .8);
}
.ao3-book-cover[data-cover-theme="apocalypse"] .ao3-book-cover__shade {
    background: linear-gradient(180deg, rgba(245, 241, 222, .08), rgba(245, 241, 222, .22) 58%, rgba(19, 28, 20, .32));
}
.ao3-book-cover[data-cover-theme="apocalypse"] :is(.ao3-book-cover__title, .ao3-book-cover__type) {
    text-shadow: 0 1px 2px rgba(245, 241, 222, .7);
}
.ao3-book-cover--placeholder .ao3-book-cover__type { display: none; }
.ao3-book-cover--placeholder .ao3-book-cover__title { top: 22%; max-height: 54%; }
.ao3-book-cover--placeholder[data-title-size="short"] .ao3-book-cover__title { top: 25%; max-height: 52%; font-size: 28cqw; }
.ao3-book-cover--compact { box-shadow: none; border-radius: 2px 4px 4px 2px; }
.ao3-book-cover--compact .ao3-book-cover__type { display: none; }
