/*
 * Child-theme homepage editorial details.
 * Generic page-shell layout, spacing, typography, color, and responsive
 * composition live in literal `tw:*` utilities in the templates. This
 * stylesheet keeps only decorative pseudo-elements, cover/ranking
 * anatomy for repeated novel items, stateful overlays, and the shared UI contract.
 */

.kol-home-archive {
    --home-number-font: "Montserrat", var(--kol-font-ui), sans-serif;
}

.kol-home-most-read__info-tooltip {
    position: absolute;
    inset-inline-end: 0;
    inset-block-start: calc(100% + 8px);
    z-index: 10;
    width: min(270px, calc(100vw - 32px));
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    color: var(--foreground);
    font-size: 0.7rem;
    line-height: 1.65;
    text-align: right;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    pointer-events: none;
}

.kol-home-most-read__info-trigger:hover + .kol-home-most-read__info-tooltip,
.kol-home-most-read__info-trigger:focus-visible + .kol-home-most-read__info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kol-home-synopsis__tooltip {
    position: absolute;
    inset-inline-end: 0;
    inset-block-start: calc(100% + 8px);
    z-index: 20;
    box-sizing: border-box;
    width: min(360px, calc(100vw - 28px));
    max-height: min(260px, 50vh);
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    color: var(--foreground);
    font-size: 0.78rem;
    line-height: 1.75;
    text-align: right;
    overflow-wrap: anywhere;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    pointer-events: none;
}

.kol-home-synopsis__tooltip-anchor:hover .kol-home-synopsis__tooltip,
.kol-home-synopsis__tooltip-anchor:focus-within .kol-home-synopsis__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.kol-home-hero::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(to left, var(--border), transparent);
    content: "";
}

.kol-home-hero__title-group,
.kol-home-hero__details {
    display: contents;
}

.kol-home-cover--hero img {
    transition: opacity 160ms ease;
}

.kol-home-cover--hero:hover img,
.kol-home-cover--hero:focus-within img {
    opacity: 0.86;
}

.kol-home-meta li + li {
    position: relative;
}

.kol-home-meta li + li::before {
    position: absolute;
    top: 50%;
    left: calc(100% + 9px);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--primary);
    content: "";
    transform: translateY(-50%);
}

.kol-home-inline-meta a + a::before {
    position: absolute;
    top: 50%;
    inset-inline-end: calc(100% + 5px);
    color: var(--border);
    content: "·";
    transform: translateY(-50%);
}

.kol-home-trending__header::after {
    position: absolute;
    inset-block-end: -1px;
    inset-inline: 0;
    width: auto;
    height: 1px;
    background: linear-gradient(to left, var(--primary), var(--border) 52%, transparent);
    content: "";
}

.kol-home-trending__item {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: clamp(9px, 1.4vw, 15px);
    direction: rtl;
    transition: transform 180ms ease;
}

.kol-home-trending__item + .kol-home-trending__item {
    padding-block-start: 18px;
}

.kol-home-trending__item + .kol-home-trending__item::before {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 1px;
    background: linear-gradient(to left, var(--border), transparent);
    content: "";
}

.kol-home-trending__details {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    padding-block-start: 1px;
}

.kol-home-trending__title-row {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: baseline;
    gap: 4px 10px;
    flex-wrap: wrap;
}

.kol-home-trending__title {
    min-width: 0;
    margin: 0;
    flex: 1 1 9rem;
    font-family: var(--kol-font-ui), Georgia, "Times New Roman", serif;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.55;
}

.kol-home-trending__title a {
    display: block;
    overflow-wrap: anywhere;
}

.kol-home-trending__title a:not(.kol-ui-link) {
    color: var(--foreground);
    transition: color 160ms ease;
}

.kol-home-trending__title a:not(.kol-ui-link):hover,
.kol-home-trending__title a:not(.kol-ui-link):focus-visible {
    color: var(--primary-text, var(--primary));
}

.kol-home-trending__rating {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 4px;
    color: var(--muted-foreground);
    direction: ltr;
    font-family: var(--home-number-font);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    white-space: nowrap;
}

.kol-home-trending__rating-star {
    color: var(--primary);
}

.kol-home-trending__rating-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-direction: column;
    gap: 3px;
}

.kol-home-trending__genres {
    margin: 5px 0 0;
    color: var(--muted-foreground);
    font-size: 0.69rem;
    line-height: 1.55;
}

.kol-home-trending__cover {
    width: 52px;
    flex: 0 0 52px;
    order: -1;
    border-radius: 2px;
}

.kol-home-trending__rank {
    display: flex;
    width: clamp(34px, 4vw, 44px);
    flex: 0 0 clamp(34px, 4vw, 44px);
    align-items: center;
    flex-direction: column;
    gap: 3px;
    order: -2;
    padding-block-start: 0;
    color: var(--muted-foreground);
    direction: ltr;
    text-align: center;
}

.kol-home-trending__rank-marker {
    color: var(--primary);
    font-family: var(--kol-font-ui), Georgia, "Times New Roman", serif;
    font-size: 0.68rem;
    line-height: 1;
}

.kol-home-trending__rank-number {
    color: var(--muted-foreground);
    font-family: var(--home-number-font);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 0.95;
    transition: color 160ms ease;
}

.kol-home-library-guest {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.kol-home-library-guest > .kol-home-trending-library__icon {
    display: inline-flex;
    color: var(--primary-text, var(--primary));
}

.kol-home-feature-actions {
    display: grid;
    width: fit-content;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kol-home-feature-actions > .kol-ui-button,
.kol-home-feature-library > .kol-library-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 10px;
}

.kol-home-feature-library {
    display: inline-flex;
    margin-block-start: 0;
}

.kol-home-library-icon-only {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
}

/* Keep the return-reading and guest library actions reachable by touch and
 * keyboard at every homepage breakpoint, including narrow RTL layouts. */
.kol-home-resume .kol-home-text-action,
.kol-home-library-guest .kol-library-btn,
.kol-home-rising-card__library,
.kol-home-shelf-library-action .kol-library-btn {
    min-height: 44px;
}

.kol-home-trending-library {
    display: inline-flex;
    max-width: 100%;
    margin-block-start: 8px;
}

.kol-home-trending__rating-actions > .kol-home-trending-library--icon-only {
    margin-block-start: 0;
}

.kol-home-trending-library .kol-library-btn {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    font-size: 0.71rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.kol-home-trending-library__label {
    display: inline-block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.kol-home-trending-library__divider {
    width: 1px;
    height: 1.1em;
    flex: 0 0 1px;
    background: var(--border);
}

.kol-home-trending-library__icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    align-items: center;
    justify-content: center;
}

.kol-home-trending-library__icon .kol-lucide {
    width: 15px;
    height: 15px;
}

.kol-home-trending-library .is-in-library .kol-home-trending-library__icon .kol-lucide {
    stroke-width: 2.35;
}

.kol-home-trending-library--icon-only .kol-home-library-icon-only .kol-home-trending-library__icon .kol-lucide {
    transform-origin: center;
    transition: color 150ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
    .kol-home-trending-library--icon-only .kol-home-library-icon-only:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible) .kol-home-trending-library__icon .kol-lucide {
        color: var(--primary);
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .kol-home-trending-library--icon-only .kol-home-library-icon-only:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible) .kol-home-trending-library__icon .kol-lucide {
        transform: translateY(-2px) scale(1.12);
    }
}

@media (hover: hover) and (pointer: fine) {
    .kol-home-trending__item:hover,
    .kol-home-trending__item:focus-within {
        transform: translateX(-2px);
    }

    .kol-home-trending__item:hover .kol-home-trending__rank-number,
    .kol-home-trending__item:focus-within .kol-home-trending__rank-number {
        color: var(--foreground);
    }
}

@media (max-width: 1020px) {
    .kol-home-trending__item {
        gap: 8px;
    }

    .kol-home-trending__cover {
        width: 49px;
        flex-basis: 49px;
    }

    .kol-home-trending__rank {
        width: 36px;
        flex-basis: 36px;
    }
}

@media (max-width: 540px) {
    .kol-home-trending__item + .kol-home-trending__item {
        padding-block-start: 15px;
    }

    .kol-home-trending__cover {
        width: 56px;
        flex-basis: 56px;
    }

    .kol-home-trending__rank {
        width: 32px;
        flex-basis: 32px;
    }

    .kol-home-trending__rank-marker {
        font-size: 0.6rem;
    }

    .kol-home-trending__rank-number {
        font-size: 1.3rem;
    }

    .kol-home-trending__title {
        font-size: 0.82rem;
    }

    .kol-home-trending__details {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-rows: auto auto;
        align-items: start;
        column-gap: 8px;
    }

    .kol-home-trending__title-row,
    .kol-home-trending__rating-actions {
        display: contents;
    }

    .kol-home-trending__title {
        grid-column: 1;
        grid-row: 1;
    }

    .kol-home-trending__rating {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
    }

    .kol-home-trending__genres {
        grid-column: 1;
        grid-row: 2;
        margin-block-start: 2px;
    }

    .kol-home-trending__rating-actions > .kol-home-trending-library--icon-only {
        grid-column: 2;
        grid-row: 2;
        justify-self: center;
    }

    .kol-home-trending__header h2,
    .kol-home-updates .kol-home-section-header h2 {
        font-size: 1.15rem;
    }

    .kol-home-trending__rating,
    .kol-home-trending__genres,
    .kol-home-trending-library .kol-library-btn {
        font-size: 0.68rem;
    }

    #content.kol-theme-content {
        margin-block-start: 12px;
    }

    .kol-home-archive .kol-home-hero {
        grid-template-columns: minmax(0, min(48vw, 210px)) minmax(0, 1fr);
        column-gap: 12px !important;
        padding-block: 12px 18px;
        padding-inline: 0;
    }

    .kol-home-archive .kol-home-hero__art {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        padding: 0;
    }

    .kol-home-archive .kol-home-hero__copy {
        display: contents;
    }

    .kol-home-archive .kol-home-hero__title-group {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        flex-direction: column;
        align-self: center;
    }

    .kol-home-archive .kol-home-hero__rank-label {
        width: auto;
        max-width: 100%;
        margin-block-end: 8px;
        font-size: 0.68rem;
        gap: 5px;
        line-height: 1.35;
    }

    .kol-home-archive #kol-home-feature-title {
        max-width: none;
        margin: 0;
        font-size: clamp(1.18rem, 5.5vw, 1.42rem);
        line-height: 1.35;
    }

    .kol-home-archive .kol-home-original-title {
        margin-block-start: 7px;
        font-size: 0.7rem;
        line-height: 1.45;
    }

    .kol-home-archive .kol-home-meta {
        margin-block-start: 10px;
        gap: 6px 12px;
        font-size: 0.7rem;
    }

    .kol-home-archive .kol-home-hero__description,
    .kol-home-archive .kol-home-inline-meta,
    .kol-home-archive .kol-home-feature-actions {
        grid-column: 1 / -1;
    }

    .kol-home-archive .kol-home-feature-actions {
        display: flex;
        flex-wrap: wrap;
        width: min(100%, 290px);
        max-width: 100%;
        align-items: stretch;
    }

    .kol-home-archive .kol-home-feature-actions > .kol-ui-button,
    .kol-home-archive .kol-home-feature-library {
        flex: 1 1 140px;
    }

    .kol-home-updates .kol-home-update-row {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .kol-home-updates .kol-home-update-row > .kol-home-cover--row {
        width: 88px;
    }

    .kol-home-archive .kol-home-library-item {
        grid-template-columns: 70px minmax(0, 1fr);
        column-gap: 12px !important;
    }

    .kol-home-archive .kol-home-library-item > .kol-home-cover--library {
        width: 68px;
    }

    .kol-home-updates .kol-home-update-row__heading h3 {
        font-size: 0.86rem;
        line-height: 1.4;
    }

    .kol-home-updates .kol-home-chapter-entry > .kol-ui-link {
        font-size: 0.74rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kol-home-trending__header > a,
    .kol-home-trending__item,
    .kol-home-trending__title a:not(.kol-ui-link),
    .kol-home-trending__rank-number,
    .kol-home-trending-library .kol-library-btn {
        transition: none;
    }
}

.kol-home-resume__header::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    width: min(190px, 42%);
    height: 1px;
    background: linear-gradient(to left, var(--primary), transparent);
    content: "";
}

.kol-home-cover--shelf:hover,
.kol-home-cover--shelf:hover img {
    transform: none;
    filter: none;
    opacity: 1;
}

.kol-home-cover--shelf:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item {
    transition: transform 180ms ease;
}

.kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:hover,
.kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:focus-within {
    transform: translateY(-4px);
}

.kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item .kol-home-cover--shelf {
    overflow: hidden;
}

.kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item .kol-home-cover--shelf img,
.kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item .kol-home-cover--shelf .local-cover-fallback img {
    transition: transform 220ms ease;
}

.kol-home-shelf-meta-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    padding: 8px 8px 32px;
    background: linear-gradient(
        to top,
        color-mix(in srgb, #000 88%, transparent),
        color-mix(in srgb, #000 0%, transparent) 72%
    );
    color: #fff;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
    direction: rtl;
}

.kol-home-shelf-meta-overlay__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 8px;
    color: inherit;
    font-family: var(--home-number-font);
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.4;
}

.kol-home-shelf-meta-overlay__genres {
    display: -webkit-box;
    overflow: hidden;
    color: color-mix(in srgb, #fff 78%, transparent);
    font-size: 0.62rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

@media (hover: hover) and (pointer: fine) {
    .kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:hover .kol-home-shelf-meta-overlay,
    .kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:focus-within .kol-home-shelf-meta-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:hover .kol-home-cover--shelf img,
    .kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:focus-within .kol-home-cover--shelf img,
    .kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:hover .kol-home-cover--shelf .local-cover-fallback img,
    .kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item:focus-within .kol-home-cover--shelf .local-cover-fallback img {
        transform: scale(1.06);
    }
}

@media (hover: none) {
    .kol-home-most-read-shelf:not(.kol-home-most-read-shelf--readers) > .kol-home-shelf-item .kol-home-shelf-meta-overlay {
        opacity: 1;
        transform: translateY(0);
    }
}

.kol-home-editorial-ranking .kol-home-most-read-card__rank::after {
    flex: 1;
    height: 1px;
    background: var(--border);
    content: "";
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(132px, 160px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 0;
    padding-block: clamp(25px, 3.5vw, 46px);
    border-block: 1px solid var(--border);
    direction: rtl;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__rank {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-block-end: clamp(21px, 2.5vw, 32px);
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__rank span {
    color: color-mix(in srgb, var(--foreground) 46%, transparent);
    font-size: clamp(2.6rem, 5.4vw, 5rem);
    font-weight: 600;
    letter-spacing: -0.05em;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 > .kol-home-most-read-card__cover-column {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 160px;
    justify-self: end;
    align-self: start;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 > .kol-home-most-read-card__cover-column > .kol-home-cover--shelf {
    width: 100%;
    aspect-ratio: 3 / 4;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__body {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    padding-block: 5px 0;
    padding-inline-start: clamp(24px, 4.5vw, 62px);
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 h3 {
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    line-height: 1.35;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 h3 a {
    display: block;
    overflow-wrap: anywhere;
    -webkit-line-clamp: unset;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__description {
    max-width: 56ch;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 {
    display: grid;
    grid-column: span 6;
    grid-template-columns: minmax(100px, 132px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 0;
    padding-block: clamp(25px, 3vw, 36px) clamp(28px, 3.5vw, 42px);
    direction: rtl;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 {
    padding-inline-end: clamp(22px, 3.5vw, 48px);
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-3 {
    padding-inline-start: clamp(22px, 3.5vw, 48px);
    border-inline-start: 1px solid var(--border);
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 .kol-home-most-read-card__rank,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 .kol-home-most-read-card__rank {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-block-end: 18px;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 .kol-home-most-read-card__rank span,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 .kol-home-most-read-card__rank span {
    color: color-mix(in srgb, var(--foreground) 66%, transparent);
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 > .kol-home-most-read-card__cover-column,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 > .kol-home-most-read-card__cover-column {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    align-self: start;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 > .kol-home-most-read-card__cover-column > .kol-home-cover--shelf,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 > .kol-home-most-read-card__cover-column > .kol-home-cover--shelf {
    width: 100%;
    aspect-ratio: 3 / 4;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 .kol-home-most-read-card__body,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 .kol-home-most-read-card__body {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    padding-block: 2px 0;
    padding-inline-start: clamp(16px, 2.2vw, 28px);
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 h3,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 h3 {
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    line-height: 1.45;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 h3 a,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 h3 a {
    -webkit-line-clamp: 3;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard {
    grid-column: span 3;
    padding-block: clamp(17px, 2vw, 25px) 0;
    padding-inline: clamp(12px, 1.8vw, 20px);
    border-block-start: 1px solid var(--border);
    direction: rtl;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard + .kol-home-most-read-card--standard {
    border-inline-start: 1px solid var(--border);
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__rank {
    margin-block-end: 11px;
    padding-block-end: 8px;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__rank span {
    font-size: 1.05rem;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard > .kol-home-cover--shelf {
    width: 100%;
    aspect-ratio: 3 / 4;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__body {
    padding-block-start: 11px;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard h3 {
    font-size: 0.86rem;
    line-height: 1.5;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__standard-info {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-block-start: 7px;
    direction: ltr;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library {
    display: flex;
    flex: 0 0 auto;
    margin: 0;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__standard-stats {
    display: flex;
    min-width: 0;
    flex: 0 1 auto;
    align-items: center;
    gap: 4px;
    margin: 0 0 0 auto;
    color: var(--muted-foreground);
    font-size: 0.64rem;
    line-height: 1.5;
    text-align: end;
    white-space: nowrap;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__standard-genres {
    display: -webkit-box;
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.67rem;
    line-height: 1.55;
    text-align: end;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button[aria-pressed="true"] {
    border-color: transparent !important;
    background-color: transparent !important;
}

.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button[aria-pressed="true"] .kol-lucide {
    color: var(--primary);
}

.kol-home-most-read-card__library .is-in-library .kol-home-most-read-card__library-icon {
    font-weight: 900;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__description {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-2 .kol-home-most-read-card__description,
.kol-home-editorial-ranking .kol-home-most-read-card--top-3 .kol-home-most-read-card__description {
    -webkit-line-clamp: 6;
}

.kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__popularity strong {
    font-size: 1.35rem;
}

/* Keep the newly-added and completed shelf title and library action on one row. */
.kol-home-shelf-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    margin-block-start: 6px;
}

.kol-home-shelf-title-row > h3 {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
}

.kol-home-shelf-library-action {
    display: flex;
    min-width: 0;
    flex: 0 0 auto;
    width: auto;
    margin-block-start: 0;
}

.kol-home-shelf-library-action .kol-library-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: var(--home-radius);
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
}

.kol-home-shelf-library-action .kol-library-btn::before,
.kol-home-shelf-library-action .kol-library-btn::after {
    content: none;
}

/* Saved state stays visually ghost; only the bookmark signals membership. */
.kol-home-shelf-library-action .kol-library-btn.is-in-library,
.kol-home-shelf-library-action .kol-library-btn[aria-pressed="true"] {
    border-color: transparent !important;
    background-color: transparent !important;
}

.kol-home-shelf-library-action .kol-library-btn.is-in-library .kol-lucide,
.kol-home-shelf-library-action .kol-library-btn[aria-pressed="true"] .kol-lucide {
    color: var(--primary);
}

/* Keep icon-only bookmark actions ghost on hover; signal state through the icon. */
.kol-home-trending-library--icon-only .kol-home-library-icon-only,
.kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button,
.kol-home-shelf-library-action .kol-library-btn {
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
    .kol-home-trending-library--icon-only .kol-home-library-icon-only:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible),
    .kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible),
    .kol-home-shelf-library-action .kol-library-btn:not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible) {
        border-color: transparent !important;
        background-color: transparent !important;
        color: var(--primary) !important;
    }

    .kol-home-trending-library--icon-only .kol-home-library-icon-only:is(:hover, :focus-visible)::before,
    .kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button:is(:hover, :focus-visible)::before,
    .kol-home-shelf-library-action .kol-library-btn:is(:hover, :focus-visible)::before {
        opacity: 0 !important;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button:is(:hover, :focus-visible) .kol-lucide,
    .kol-home-shelf-library-action .kol-library-btn:is(:hover, :focus-visible) .kol-lucide {
        color: var(--primary);
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .kol-home-trending-library--icon-only .kol-home-library-icon-only:not(:disabled):is(:hover, :focus-visible),
    .kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button:not(:disabled):is(:hover, :focus-visible),
    .kol-home-shelf-library-action .kol-library-btn:not(:disabled):is(:hover, :focus-visible) {
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kol-home-trending-library--icon-only .kol-home-library-icon-only,
    .kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__library-button,
    .kol-home-shelf-library-action .kol-library-btn {
        transition: none;
    }
}

@media (max-width: 700px) {
    .kol-home-editorial-ranking .kol-home-most-read-card--standard .kol-home-most-read-card__standard-stats {
        flex-wrap: wrap;
        gap: 3px;
        font-size: 0.58rem;
        white-space: normal;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 {
        grid-template-columns: minmax(96px, 122px) minmax(0, 1fr);
        column-gap: 0;
        padding-block: 22px 30px;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 h3 {
        font-size: clamp(1.25rem, 4.5vw, 1.85rem);
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__description {
        font-size: 0.76rem;
        line-height: 1.75;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-2,
    .kol-home-editorial-ranking .kol-home-most-read-card--top-3 {
        grid-column: 1 / -1;
        grid-template-columns: minmax(88px, 112px) minmax(0, 1fr);
        padding-block: 23px 30px;
        padding-inline: 0;
        border-inline-start: 0;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-2 .kol-home-most-read-card__body,
    .kol-home-editorial-ranking .kol-home-most-read-card--top-3 .kol-home-most-read-card__body {
        padding-inline-start: 18px;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--standard {
        grid-column: span 3;
        padding-inline: 10px;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--standard:nth-child(2n + 6) {
        border-inline-start: 0;
    }
}

@media (max-width: 360px) {
    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__rank {
        grid-column: 1;
        grid-row: 1;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 > .kol-home-most-read-card__cover-column {
        grid-column: 1;
        grid-row: 2;
        width: min(110px, 38vw);
        margin-block-end: 18px;
        justify-self: start;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 .kol-home-most-read-card__body {
        grid-column: 1;
        grid-row: 3;
        padding-block-start: 18px;
        padding-inline-start: 0;
        border-block-start: 1px solid var(--border);
        border-inline-start: 0;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-1 h3 {
        font-size: 1.3rem;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-2,
    .kol-home-editorial-ranking .kol-home-most-read-card--top-3 {
        grid-template-columns: minmax(80px, 96px) minmax(0, 1fr);
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--top-2 .kol-home-most-read-card__body,
    .kol-home-editorial-ranking .kol-home-most-read-card--top-3 .kol-home-most-read-card__body {
        padding-inline-start: 14px;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--standard {
        padding-inline: 8px;
    }

    .kol-home-editorial-ranking .kol-home-most-read-card--standard h3 {
        font-size: 0.8rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .kol-home-cover--hero img,
    .kol-home-most-read-card {
        transition: none;
    }
}

/* Weekly ranking: the repeated card anatomy stays authored here. */
.kol-home-rising-header::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary) 50%, transparent);
    content: "";
}

.kol-home-rising-card__cover {
    position: relative;
    display: block;
    overflow: hidden;
    min-width: 0;
    aspect-ratio: 3 / 4;
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: var(--home-radius, 2px);
    background: var(--muted);
}

.kol-home-rising-card__cover {
    width: 100%;
}

.kol-home-rising-card__cover img,
.kol-home-rising-card__cover .local-cover-fallback {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kol-home-rising-card__cover img {
    transition: transform 220ms ease, opacity 180ms ease;
}

.kol-home-rising-card__cover:hover img,
.kol-home-rising-card__cover:focus-visible img {
    opacity: 0.88;
    transform: scale(1.035);
}

.kol-home-rising-card__copy h3,
.kol-home-rising-card__title {
    min-width: 0;
    margin: 0;
    font-family: var(--kol-font-ui), Georgia, "Times New Roman", serif;
    font-weight: 700;
}

.kol-home-rising-card__copy h3 a,
.kol-home-rising-card__title a {
    display: block;
    overflow-wrap: anywhere;
}

.kol-home-rising-card__copy h3 a:not(.kol-ui-link),
.kol-home-rising-card__title a:not(.kol-ui-link) {
    color: var(--foreground);
}

.kol-home-rising-card__copy h3 a:not(.kol-ui-link):hover,
.kol-home-rising-card__copy h3 a:not(.kol-ui-link):focus-visible,
.kol-home-rising-card__title a:not(.kol-ui-link):hover,
.kol-home-rising-card__title a:not(.kol-ui-link):focus-visible {
    color: var(--primary-text, var(--primary));
}

.kol-home-rising-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 13px;
    margin: 5px 0 0;
    color: var(--muted-foreground);
    font-family: var(--home-number-font);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}

.kol-home-rising-card__meta span + span {
    position: relative;
}

.kol-home-rising-card__meta span + span::before {
    position: absolute;
    top: 50%;
    inset-inline-end: calc(100% + 6px);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--primary);
    content: "";
    transform: translateY(-50%);
}

.kol-home-rising-card__genres {
    margin: 4px 0 0;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    line-height: 1.6;
}

body .kol-home-rising-kings .kol-home-rising-card__library {
    min-width: 0;
    min-height: 36px;
    border-radius: var(--home-radius, 2px);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}

.kol-home-rising-card {
    display: flex;
    gap: 0;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    padding-block: 0 12px;
    margin-block-end: 0;
    border-block-end: 1px solid var(--border);
}

.kol-home-rising-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-block-end: 11px;
    border-block-end: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.kol-home-rising-card__rank {
    color: var(--primary-text, var(--primary));
    font-family: var(--home-number-font);
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
}

.kol-home-rising-card__rating {
    color: var(--rating-text, var(--rating));
    direction: ltr;
    font-family: var(--home-number-font);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.kol-home-rising-card__body {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
    padding-block-start: 12px;
}

.kol-home-rising-card__copy {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
}

.kol-home-rising-card__copy h3 {
    font-size: 0.84rem;
    line-height: 1.5;
}

.kol-home-rising-card__copy h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body .kol-home-rising-kings .kol-home-rising-card__library {
    display: inline-flex;
    width: 100%;
    margin-block-start: 7px;
    padding-inline: 10px;
}

body .kol-home-rising-kings .kol-home-rising-card__library .kol-lucide {
    width: 15px;
    height: 15px;
}

.kol-home-rising-card:hover,
.kol-home-rising-card:focus-within {
    border-color: var(--primary);
}

/* The weekly ranking uses one consistent card for every title. */

.kol-home-rising-grid .kol-home-rising-card {
    position: relative;
    height: 100%;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-block-start: 1px solid var(--border);
    border-radius: var(--home-radius, 2px);
    background: color-mix(in srgb, var(--card) 78%, var(--background));
}

.kol-home-rising-grid .kol-home-rising-card::before {
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    width: 100%;
    height: 1px;
    border-radius: var(--home-radius, 2px);
    background: var(--primary);
    content: "";
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 240ms ease;
}

.kol-home-rising-grid .kol-home-rising-card__header {
    min-height: 24px;
    padding-block-end: 8px;
}

.kol-home-rising-grid .kol-home-rising-card__title {
    flex: 1 1 auto;
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: right;
}

.kol-home-rising-grid .kol-home-rising-card__title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.kol-home-rising-grid .kol-home-rising-card__body {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    flex: 1;
    padding-block-start: 10px;
}

.kol-home-rising-grid .kol-home-rising-card__cover {
    width: 72px;
}

.kol-home-rising-grid .kol-home-rising-card__copy {
    height: 100%;
}

.kol-home-rising-grid .kol-home-rising-card__meta {
    margin-block-start: 5px;
}

.kol-home-rising-grid .kol-home-rising-card__genres {
    margin-block-start: 4px;
}

.kol-home-rising-grid .kol-home-rising-card__hover-content {
    min-width: 0;
    overflow: hidden;
}

.kol-home-rising-grid .kol-home-rising-card__hover-rail {
    display: flex;
    width: 200%;
    direction: ltr;
    transform: translateX(50%);
    transition: transform 220ms ease;
}

.kol-home-rising-grid .kol-home-rising-card__metadata,
.kol-home-rising-grid .kol-home-rising-card__description {
    box-sizing: border-box;
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    direction: rtl;
}

.kol-home-rising-grid .kol-home-rising-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 5px 0 0;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.kol-home-rising-grid .kol-home-rising-card__library {
    margin-block-start: auto;
}

@media (hover: hover) and (pointer: fine) {
    .kol-home-rising-grid .kol-home-rising-card--has-synopsis:hover .kol-home-rising-card__hover-rail,
    .kol-home-rising-grid .kol-home-rising-card--has-synopsis:focus-within .kol-home-rising-card__hover-rail {
        transform: translateX(0);
    }
}

@media (hover: none) {
    .kol-home-rising-grid .kol-home-rising-card__hover-rail {
        display: block;
        width: auto;
        transform: none;
    }

    .kol-home-rising-grid .kol-home-rising-card__metadata,
    .kol-home-rising-grid .kol-home-rising-card__description {
        width: auto;
        flex: none;
    }

    .kol-home-rising-grid .kol-home-rising-card__description {
        display: -webkit-box;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kol-home-rising-grid .kol-home-rising-card__hover-rail,
    .kol-home-rising-grid .kol-home-rising-card::before {
        transition-duration: 0s;
    }
}

.kol-home-rising-grid .kol-home-rising-card:hover,
.kol-home-rising-grid .kol-home-rising-card:focus-within {
    border-color: var(--border);
}

.kol-home-rising-grid .kol-home-rising-card:hover::before,
.kol-home-rising-grid .kol-home-rising-card:focus-within::before {
    transform: scaleX(1);
}

/* Weekly discovery carousel: keep the artwork visible until a reader opens a card. */
.kol-home-weekly-actions {
    flex: 0 0 auto;
}

.kol-home-weekly-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kol-home-weekly-controls[hidden] {
    display: none;
}

.kol-home-weekly-controls .kol-ui-button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--home-radius, 2px);
    color: var(--foreground);
}

.kol-home-weekly-controls .kol-ui-button:disabled {
    cursor: default;
    opacity: 0.42;
}

.kol-home-weekly-controls .kol-lucide {
    width: 18px;
    height: 18px;
}

.kol-home-weekly-carousel__track {
    display: flex;
    width: 100%;
    gap: clamp(10px, 1.4vw, 16px);
    margin-block-start: clamp(18px, 2vw, 24px);
    padding: 3px 1px 11px;
    overflow-x: auto;
    overflow-y: hidden;
    direction: rtl;
    scroll-padding-inline: 1px;
    scroll-snap-type: x mandatory;
    scrollbar-color: color-mix(in srgb, var(--primary) 55%, transparent) transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.kol-home-weekly-carousel__track:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.kol-home-weekly-carousel__track::-webkit-scrollbar {
    height: 6px;
    display: block;
}

.kol-home-weekly-carousel__track::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: color-mix(in srgb, var(--primary) 55%, transparent);
}

.kol-home-weekly-card {
    position: relative;
    display: block;
    min-width: 0;
    flex: 0 0 clamp(155px, 15.7vw, 190px);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--home-radius, 2px);
    background: var(--muted);
    scroll-snap-align: start;
}

.kol-home-weekly-card__cover {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.kol-home-weekly-card__cover > img,
.kol-home-weekly-card__cover .local-cover-fallback,
.kol-home-weekly-card__cover .local-cover-fallback > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kol-home-weekly-card__cover:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
}

.kol-home-weekly-card__rank {
    position: absolute;
    z-index: 4;
    inset-block-start: 8px;
    inset-inline-start: 9px;
    color: #fff;
    direction: ltr;
    font-family: var(--home-number-font);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 4px rgb(0 0 0 / 90%);
    pointer-events: none;
}

.kol-home-weekly-card__hint {
    position: absolute;
    inset-block-end: 10px;
    inset-inline-start: 10px;
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--home-radius, 2px);
    background: rgb(12 12 12 / 75%);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.kol-home-weekly-card__hint .kol-lucide {
    width: 14px;
    height: 14px;
}

.kol-home-weekly-card__details {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 12px 11px;
    overflow-y: auto;
    background: linear-gradient(0deg, rgb(10 10 10 / 97%) 0%, rgb(10 10 10 / 95%) 72%, rgb(10 10 10 / 50%) 100%);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    visibility: hidden;
    transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms;
}

.kol-home-weekly-card__details::-webkit-scrollbar {
    width: 4px;
}

.kol-home-weekly-card__details::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background: rgb(255 255 255 / 48%);
}

.kol-home-weekly-card__close {
    position: absolute;
    z-index: 4;
    top: 7px;
    right: 7px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    appearance: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms;
}

.kol-home-weekly-card__close .kol-lucide {
    width: 15px;
    height: 15px;
}

.kol-home-weekly-card__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.kol-home-weekly-card.is-open .kol-home-weekly-card__close {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.kol-home-weekly-card__title-row {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    justify-content: space-between;
    gap: 5px;
}

.kol-home-weekly-card__title {
    min-width: 0;
    margin: 0;
    font-family: var(--kol-font-ui), Georgia, "Times New Roman", serif;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.4;
}

.kol-home-weekly-card__title a {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    overflow-wrap: anywhere;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.kol-home-weekly-card__title a:hover,
.kol-home-weekly-card__title a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.kol-home-weekly-card__rating {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    color: var(--rating-text, var(--rating, #f5c542));
    direction: ltr;
    font-family: var(--home-number-font);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.kol-home-weekly-card__genres {
    display: -webkit-box;
    margin: 5px 0 0;
    overflow: hidden;
    color: rgb(255 255 255 / 82%);
    font-size: 0.67rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.kol-home-weekly-card__chapters {
    margin: 5px 0 0;
    color: #fff;
    font-size: 0.69rem;
    font-weight: 600;
    line-height: 1.35;
}

.kol-home-weekly-card__read {
    display: flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    margin-block-start: 8px;
    padding: 6px 9px;
    border-color: rgb(255 255 255 / 58%);
    border-radius: var(--home-radius, 2px);
    background: transparent;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

.kol-home-weekly-card__read:hover,
.kol-home-weekly-card__read:focus-visible {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground, #fff);
}

.kol-home-weekly-card.is-open .kol-home-weekly-card__details {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.kol-home-weekly-card.is-open .kol-home-weekly-card__hint {
    opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
    .kol-home-weekly-card__close {
        display: none;
    }

    .kol-home-weekly-card__hint {
        display: none;
    }

    .kol-home-weekly-card:not(.is-dismissed):hover .kol-home-weekly-card__close {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .kol-home-weekly-card:not(.is-dismissed):hover .kol-home-weekly-card__details {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .kol-home-weekly-card:not(.is-dismissed):hover .kol-home-weekly-card__hint {
        opacity: 0;
    }
}

@media (max-width: 720px) {
    .kol-home-weekly-carousel__track {
        gap: 12px;
        margin-block-start: 18px;
    }

    .kol-home-weekly-card {
        flex-basis: min(46vw, 178px);
    }
}

@media (max-width: 420px) {
    .kol-home-weekly-card {
        flex-basis: min(48vw, 170px);
    }

    .kol-home-weekly-card__details {
        padding-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kol-home-weekly-card__details,
    .kol-home-weekly-card__hint {
        transition: none;
    }
}
