/*
 * CUSTOM STYLES — wp-custom-css.css
 *
 * Component and layout overrides.
 * Theme palettes live in assets/css/theme.css; shared UI lives in assets/css/ui.css.
 */


/* Keep the header's search and account controls together as one flex item. */
.kol-header-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.kol-header-tools > .searchx,
.kol-header-tools > .local-account-menu,
.kol-header-tools > .srcmob {
    float: none;
}

.kol-header-tools > .searchx {
    flex: 0 1 200px;
    margin: 10px 0 0;
}

.searchx #form #s {
    color: var(--foreground);
}

.kol-header-tools > .local-account-menu,
.kol-header-tools > .srcmob {
    flex: 0 0 auto;
}

.kol-header-tools > .local-account-menu {
    margin: 0;
}

.kol-header-tools > .srcmob {
    margin: 5px 0 0;
}

.wrapper {
    margin: 0;
}

.darkmode {

    p {
        color: #c4c4c4;
    }

    .naveps {
        .nvs {
            a {
                background: var(--sidebar-accent);
            }
        }
    }

    .seriestwo {
        .sertobig {
            background: transparent !important;
            box-shadow: none;
            overflow: visible;
        }
    }
}

body {
    position: inherit;

    > div.mainholder.rtl {
        > div.th {
            > div.centernav.bound {
                display: flex;
                flex-direction: row;
                justify-content: space-evenly;

                > a {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin: 0;

                    span {
                        display: none;
                    }
                }

                > svg {
                    display: none;
                }
            }
        }
    }

    .pms-account-navigation {
        li.pms-account-navigation-link {
            a {
                display: inline-block;
                color: var(--accent);
                padding: 7px 16px;
                border-radius: var(--border-radius);
                border: 1px solid var(--accent);
                box-shadow: none;

                &:hover,
                &.pms-account-navigation-link--active {
                    background: var(--primary);
                    box-shadow: none;
                }
            }
        }
    }

    .pms-account-subscription-action-link {
        display: inline-block;
        padding: 5px 14px;
        border-radius: 5px;
        text-decoration: none;
        font-size: 13px;
        border: 1px solid var(--accent);
        color: var(--accent);

        &:hover {
            background: var(--primary);
            color: #fff;
        }

        &.pms-account-subscription-action-link__renew,
        &.pms-account-subscription-action-link__change {
            background: var(--primary);
            color: #fff;
            border: none;
            transition: 500ms ease-in-out;

            &:hover {
                translate: 0 -2px;
                transition: 500ms ease-in-out;
            }
        }

        &.pms-account-subscription-action-link__cancel,
        &.pms-account-subscription-action-link__abandon {
            background: transparent;
            color: var(--muted-foreground);
            border-color: var(--border);
        }
    }

    &[data-sub="false"] {
        .epl-pdf,
        .eph-pdf {
            display: none;
        }

        .eplister > ul:nth-child(2) > li {
            display: flex;

            a {
                flex: 1;
            }
        }
    }

    .srcmob {
        @media only screen and (max-width: 570px) {
            height: 35px;
        }
    }

    @media only screen and (max-width: 590px) {
        .kol-chapter-bar__jump {
            font-size: 0;
            height: 27px;
            display: flex;
            flex-direction: row;
            align-items: center;
        }

        .kol-chapter-bar__tools .optread.optxid {
            gap: 0;
            padding: var(--font-size-small);
        }
    }

    @media only screen and (max-width: 350px) {
        .kol-chapter-bar__tools {
            gap: var(--gap-small);
        }

        .kol-chapter-bar__scroll {
            gap: var(--gap-small);

            > a {
                padding: var(--padding-small);
            }
        }
    }
}

/* Hiding elements */
body > div.mainholder.rtl > div.th > div.centernav.bound > a span,
body > div.mainholder.rtl > div.th > div.centernav.bound > svg,
.kol-chapter-bar__scroll-btn span,
.kol-chapter-bar__scroll-btn i,
div.optx-content div.alignButton > button i {
    display: none;
}

/* Chapter bar (new class names — avoid theme #kol_navbar / .naveps / .dlpdf) */
.kol-chapter-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 12px;
    width: 100%;
    box-sizing: border-box;
}

.kol-chapter-bar__nav {
    width: 100%;
    margin: 0;
    padding: 0;
}

.kol-chapter-bar__nav-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.kol-chapter-bar__nav-item {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.kol-chapter-bar__nav-item.is-empty {
    display: none;
}

.kol-chapter-bar__nav-item > a,
.kol-chapter-bar__jump {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 12px;
    margin: 0;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.29);
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
    font: inherit;
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        filter 0.15s ease;
}

.kol-chapter-bar__nav-item > a:hover,
.kol-chapter-bar__nav-item > a:focus,
.kol-chapter-bar__jump:hover,
.kol-chapter-bar__jump:focus {
    background: rgba(0, 0, 0, 0.12);
    color: #111;
    filter: none;
}

.kol-chapter-bar__btn:hover,
.kol-chapter-bar__btn:focus {
    background: rgba(0, 0, 0, 0.12);
    color: #111;
    filter: none;
}

.kol-chapter-bar__pdf:hover,
.kol-chapter-bar__pdf:focus {
    background: rgba(0, 0, 0, 0.12);
    color: #111;
    filter: none;
}

.darkmode .kol-chapter-bar__nav-item > a:hover,
.darkmode .kol-chapter-bar__nav-item > a:focus,
.darkmode .kol-chapter-bar__jump:hover,
.darkmode .kol-chapter-bar__jump:focus,
.darkmode .kol-chapter-bar__btn:hover,
.darkmode .kol-chapter-bar__btn:focus,
.darkmode .kol-chapter-bar__pdf:hover,
.darkmode .kol-chapter-bar__pdf:focus {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    filter: brightness(1.15);
}

.kol-chapter-bar__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.kol-chapter-bar__tools-start {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.kol-chapter-bar__scroll {
    display: flex;
    gap: 8px;
}

/* Immediate reader colors; saved reading preferences overwrite these inline. */
body.lightmode .bixbox.episodedl,
body.lightmode .bixbox.episodedl .navimedia {
    background-color: #fff !important;
}

body.lightmode .bixbox.episodedl .epcontent.entry-content {
    color: #171717 !important;
}

body.darkmode .bixbox.episodedl,
body.darkmode .bixbox.episodedl .navimedia {
    background-color: #222 !important;
}

body.darkmode .bixbox.episodedl .epcontent.entry-content {
    color: #f2f2f2 !important;
}

.kol-chapter-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.29);
    border-radius: 4px;
    border: none;
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    font: inherit;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        filter 0.15s ease;
}

.kol-chapter-bar__tools .kol-chapter-bar__btn,
.kol-chapter-bar__tools .optread.kol-chapter-bar__btn,
.kol-chapter-bar__tools .kol-rs-trigger.kol-chapter-bar__btn {
    float: none;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.29) !important;
    color: inherit !important;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.kol-chapter-bar__tools .optread.kol-chapter-bar__btn .kol-lucide,
.kol-chapter-bar__tools .kol-rs-trigger.kol-chapter-bar__btn .kol-lucide {
    font-size: 15px;
    line-height: 1;
}

.kol-chapter-bar__scroll-btn {
    min-width: 36px;
    padding: 8px 12px;
}

.kol-chapter-bar__scroll-btn span {
    display: none;
}

.kol-chapter-bar__scroll-btn:first-child::after,
.kol-chapter-bar__scroll-btn:last-child::after {
    content: none;
}

.kol-chapter-bar__scroll-btn .kol-lucide {
    width: 18px;
    height: 18px;
}

.kol-chapter-bar__pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.29);
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        filter 0.15s ease;
}

#kol-chapter-picker select.select-chapter,
#kol-chapter-picker .select-chapter {
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
}

/* Keep reader settings overlay above page chrome */
body > .option-over,
body > .option-over.optxshd,
body > .option-over.optxshd.optxshds,
.option-over.optxshd {
    z-index: 100000;
}

/* Option content styles */
div.optx-content {
    button {
        cursor: pointer;
        background: var(--sidebar-primary);
        border: none;
        border-radius: var(--border-radius);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: var(--primary-foreground);

        &:hover {
            border-right: var(--ring) 1px solid;
            border-left: var(--ring) 1px solid;
        }
    }

    div.alignButton {
        display: flex;
        flex-direction: row;
        gap: var(--gap-small);
        justify-content: center;
        align-items: center;

        > button {
            padding: var(--padding-small);

            &:nth-child(1)::after {
                content: "⥱";
            }

            &:nth-child(2)::after {
                content: "☰";
            }

            i {
                display: none;
            }
        }
    }
}

/* Option overlay styles */
body > div.option-over.optxshd.optxshds {
    > div > div > div.optx-content {
        > div:nth-child(7) > div > div {
            gap: var(--gap-small);
        }

        > div:nth-child(6) > div > button {
            padding: var(--padding-small);
        }
    }
}

/* Naveps styles */
.naveps {
    .nvs {
        a {
            border-radius: var(--border-radius);
        }
    }
}

.th {
    .centernav {
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
    }
}

/* Bottom chapter nav — same button chrome as top bar */
#Bottum_Down.kol-chapter-bar {
    margin: 12px 0 0;
}

#Bottum_Down .kol-chapter-bar__nav-row {
    width: 100%;
}

.announ:has(img) {
    display: grid;
    place-items: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.sertobig {
    position: relative;
    border-radius: 3px;
    background: var(--card);
    border: none;
    box-shadow: var(--shadow-md);
    overflow: visible;
    max-width: min(960px, calc(100vw - 2rem));
    margin: 1.25rem auto;
    min-width: unset;
    color: var(--foreground);
}

article {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lastend {
    display: flex;
    gap: 6px;
    flex-direction: row;
    align-items: stretch;
    margin: 10px 15px;

    .inepcx {
        flex: 1;
        width: auto;

        & > a {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            border: none;
            background: var(--primary);
            color: #fff;
            width: 100%;
            font-size: 12px;
            font-weight: 500;
            transition:
                background 0.2s,
                filter 0.2s;
            border-radius: 8px;
            text-decoration: none;
            text-align: center;
            margin: 0;
            padding: 6px;

            &:hover {
                color: #fff;
                background: var(--primary);
                filter: saturate(1.45);
            }
        }
    }
}

/* Collapsible Section Arrows */
.ts-chl-collapsible {
    &:has(+ .ts-chl-collapsible-content[style*="display: none"]):after {
        transform: rotate(0deg);
    }

    &:after {
        content: "";
        display: inline-block;
        width: 24px;
        height: 24px;
        background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb25zLWRvd24taWNvbiBsdWNpZGUtY2hldnJvbnMtZG93biI+PHBhdGggZD0ibTcgNiA1IDUgNS01Ii8+PHBhdGggZD0ibTcgMTMgNSA1IDUtNSIvPjwvc3ZnPg==");
        background-size: contain;
        float: left;
        filter: invert(1);
        transition: transform 0.3s ease;
        transform: rotate(180deg);
    }
}

.bixbox.image-list {
    max-width: 100vw;
}

/* ===== صفحة الرواية ===== */

/* Parent theme sets #content { overflow: hidden } and .insertobig { overflow: hidden }.
   Either one breaks position: sticky on .sertocover-col (not present in local preview HTML). */
#content.sertwofull {
    overflow: visible;
}

.sertwofull .seriestwo .sertobig,
.sertwofull .seriestwo .sertobig .insertobig {
    overflow: visible !important;
}

.seriestwo {
    .sertobody {
        padding: 0;
        min-width: unset;
        width: 100%;
    }

    .sertobig {
        .sertofooter-escape-route {
            .bookmark {
                border-radius: 5px;
            }
        }

        .insertobig {
            display: flex;
            flex-direction: row;
            gap: 24px;
            align-items: flex-start;
            padding: 24px;
            box-sizing: border-box;
            max-width: none;
            margin: 0;
            float: none;
            overflow: visible;
            color: var(--foreground);

            a {
                color: var(--primary);
            }

            .mycred-my-balance-wrapper {
                color: var(--foreground);
            }

            /* الغلاف + أزرار الإجراءات (sticky على سطح المكتب) */
            .sertocover-col {
                flex-shrink: 0;
                width: fit-content;
                max-width: 250px;
                display: flex;
                flex-direction: column;
                gap: 10px;
                position: sticky;
                top: 88px;
                align-self: flex-start;
                z-index: 3;
            }

            .sertothumb {
                position: relative;
                width: 100%;
                min-width: 0;
                float: none;
                margin: 0;

                img {
                    width: 100%;
                    max-width: 250px;
                    height: auto;
                    border-radius: var(--radius-lg);
                    display: block;
                    border: none;
                    box-shadow: var(--shadow-md);
                    transition:
                        box-shadow 0.2s ease,
                        transform 0.2s ease;
                }
            }

            .sertostat {
                position: absolute;
                top: 10px;
                inset-inline-end: 10px;
                z-index: 2;
                margin: 0;
                pointer-events: none;

                span {
                    display: inline-block;
                    padding: 4px 10px;
                    border-radius: 999px;
                    font-size: 11px;
                    font-weight: 700;
                    background: color-mix(
                        in oklch,
                        var(--card) 82%,
                        transparent
                    );
                    color: var(--foreground);
                    border: 1px solid
                        color-mix(
                            in oklch,
                            var(--foreground) 18%,
                            var(--border)
                        );
                    backdrop-filter: blur(6px);
                    box-shadow: var(--shadow-sm);
                }
            }

            .sertoactions {
                display: flex;
                flex-direction: column;
                gap: 8px;
                width: 100%;
                max-width: 250px;
            }

            /* المعلومات */
            .sertoinfo {
                flex: 1;
                min-width: 0;
                display: flex;
                flex-direction: column;
                gap: 10px;
                color: var(--foreground);

                .entry-title {
                    margin: 0 0 4px;
                    font-size: clamp(18px, 3vw, 32px);
                    line-height: 1.15;
                    color: var(--foreground);
                }

                .alter {
                    display: block;
                    margin: 0 0 2px;
                    font-size: 13px;
                    line-height: 1.5;
                    padding: 0;
                    border: none;
                    border-radius: 0;
                    background: transparent;
                    color: var(--muted-foreground);
                    opacity: 1;
                }

                /* الجدول */
                .sertoauth {
                    display: flex;
                    flex-direction: column;
                    border: 1px solid var(--border);
                    border-radius: var(--radius-lg);
                    overflow: hidden;
                    background: var(--muted);
                    box-shadow: var(--shadow-sm);

                    .serl {
                        display: grid;
                        grid-template-columns: minmax(8rem, 36%) minmax(0, 1fr);
                        align-items: stretch;
                        position: relative;
                        margin: 0;
                        padding: 0;
                        min-height: 42px;
                        float: none;
                        width: 100%;
                        box-sizing: border-box;

                        &:last-child {
                            border-bottom: none;
                        }

                        &:not(:last-child)::after {
                            content: "";
                            position: absolute;
                            inset-inline: 12px;
                            bottom: 0;
                            height: 1px;
                            background: color-mix(
                                in oklch,
                                var(--border) 88%,
                                transparent
                            );
                            pointer-events: none;
                        }

                        span {
                            display: flex;
                            align-items: center;
                            box-sizing: border-box;
                        }

                        .sername {
                            gap: 8px;
                            width: auto;
                            padding: 10px 12px;
                            font-size: 12px;
                            font-weight: 600;
                            line-height: 1.35;
                            white-space: nowrap;
                            color: var(--muted-foreground);
                            background: color-mix(
                                in oklch,
                                var(--card) 55%,
                                transparent
                            );
                            border-inline-end: 1px solid
                                color-mix(
                                    in oklch,
                                    var(--border) 88%,
                                    transparent
                                );
                            box-shadow: none;

                            &::before {
                                content: "";
                                display: inline-block;
                                width: 15px;
                                height: 15px;
                                background-size: contain;
                                background-repeat: no-repeat;
                                background-position: center;
                                flex-shrink: 0;
                                opacity: 0.72;
                            }
                        }

                        .serval {
                            flex: 1;
                            min-width: 0;
                            padding: 9px 12px;
                            font-size: 13px;
                            font-weight: 600;
                            line-height: 1.45;
                            color: var(--foreground);
                            text-align: start;
                            justify-content: flex-start;
                            align-items: center;
                            align-content: center;
                            flex-wrap: wrap;
                            gap: 6px;

                            &:not(:has(a)) {
                                display: block;
                            }

                            &:has(a) {
                                display: block;
                                font-size: 0;
                                line-height: 0;
                            }

                            x-view {
                                font-variant-numeric: tabular-nums;
                            }

                            a {
                                display: inline;
                                margin: 0;
                                padding: 0;
                                border: none;
                                border-radius: 0;
                                background: none;
                                font-size: 13px;
                                font-weight: 600;
                                line-height: 1.45;
                                color: var(--primary);
                                cursor: pointer;
                                text-decoration: underline;
                                text-decoration-color: color-mix(
                                    in oklch,
                                    var(--primary) 45%,
                                    transparent
                                );
                                text-underline-offset: 0.14em;
                                transition:
                                    color 0.2s ease,
                                    text-decoration-color 0.2s ease;

                                &:hover,
                                &:focus-visible {
                                    color: color-mix(
                                        in oklch,
                                        var(--primary) 82%,
                                        var(--foreground)
                                    );
                                    background: none;
                                    border: none;
                                    outline: none;
                                    text-decoration-color: currentColor;
                                }

                                &:not(:last-child)::after {
                                    content: "،";
                                    display: inline;
                                    margin-inline: 0.35em;
                                    color: var(--muted-foreground);
                                    font-weight: 400;
                                    text-decoration: none;
                                }
                            }

                            &:has(a) a {
                                font-size: 13px;
                                line-height: 1.45;
                            }
                        }
                    }

                    /* أيقونات SVG للجدول */
                    .serl:nth-child(1) .sername::before {
                        background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22/%3E%3Cpath%20d%3D%22M12%202a14.5%2014.5%200%200%200%200%2020%2014.5%2014.5%200%200%200%200-20%22/%3E%3Cpath%20d%3D%22M2%2012h20%22/%3E%3C/svg%3E");
                    }
                    .serl:nth-child(2) .sername::before {
                        background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22/%3E%3Cpath%20d%3D%22M16%202v4M8%202v4M3%2010h18%22/%3E%3C/svg%3E");
                    }
                    .serl:nth-child(3) .sername::before {
                        background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M17%203a2.85%202.83%200%201%201%204%204L7.5%2020.5%202%2022l1.5-5.5Z%22/%3E%3C/svg%3E");
                    }
                    .serl:nth-child(4) .sername::before {
                        background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m5%208%206%206%22/%3E%3Cpath%20d%3D%22m4%2014%206-6%202-3%22/%3E%3Cpath%20d%3D%22M2%205h12%22/%3E%3Cpath%20d%3D%22M7%202h1%22/%3E%3Cpath%20d%3D%22m22%2022-5-10-5%2010%22/%3E%3Cpath%20d%3D%22M14%2018h6%22/%3E%3C/svg%3E");
                    }
                    .serl:nth-child(5) .sername::before {
                        background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2019.5v-15A2.5%202.5%200%200%201%206.5%202H20v20H6.5a2.5%202.5%200%200%201%200-5H20%22/%3E%3C/svg%3E");
                    }
                    .serl:nth-child(6) .sername::before {
                        background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2%2012s3-7%2010-7%2010%207%2010%207-3%207-10%207-10-7-10-7Z%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22/%3E%3C/svg%3E");
                    }
                }

                /* التصنيفات */
                .sertogenre {
                    display: grid;
                    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
                    gap: 6px;
                    border: 1px solid var(--border);
                    border-radius: var(--radius-lg);
                    overflow: hidden;
                    margin-top: 0;
                    padding: 12px 14px;
                    padding-top: 0;
                    background: var(--muted);
                    box-shadow: var(--shadow-sm);

                    .sertogenre-title {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        padding: 8px 12px;
                        font-size: 15px;
                        font-weight: 700;
                        background: var(--primary);
                        color: var(--primary-foreground);
                        grid-column: 1 / -1;
                        border: none;
                        border-radius: 0;
                        margin: 0 calc(-14px) 6px;
                    }

                    a {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        padding: 7px 12px;
                        font-size: 12px;
                        font-weight: 700;
                        color: var(--foreground);
                        background: var(--card);
                        text-decoration: none;
                        border: 1px solid var(--border);
                        border-radius: 999px;
                        cursor: pointer;
                        transition:
                            background 0.2s ease,
                            color 0.2s ease,
                            border-color 0.2s ease;
                        text-align: center;
                        box-sizing: border-box;
                        aspect-ratio: 4/2;
                        flex: 1;
                        &:hover,
                        &:focus-visible {
                            color: var(--foreground);
                            background: var(--accent);
                            border-color: color-mix(
                                in oklch,
                                var(--muted-foreground) 45%,
                                var(--border)
                            );
                            outline: none;
                        }
                    }
                }

                .rating.serrate {
                    display: none;
                }

                .custom-rating {
                    display: flex;
                    flex-direction: column;
                    border: 1px solid var(--border);
                    border-radius: var(--radius-lg);
                    overflow: hidden;
                    margin-top: 2px;
                    background: var(--muted);
                    box-shadow: var(--shadow-sm);

                    .custom-rating-item {
                        display: flex;
                        flex-direction: row;
                        align-items: center;
                        justify-content: space-between;
                        gap: 12px;
                        padding: 11px 14px;
                        border-bottom: 1px solid
                            color-mix(in oklch, var(--border) 88%, transparent);

                        &:last-of-type {
                            border-bottom: none;
                        }
                    }

                    .custom-rating-label {
                        flex: 1 1 auto;
                        min-width: 0;
                        font-size: 12px;
                        font-weight: 600;
                        line-height: 1.35;
                        color: var(--muted-foreground);
                        text-align: start;
                    }

                    .rtp {
                        display: inline-block;
                        flex: 0 0 auto;
                        width: auto;
                        max-width: none;
                        height: auto;
                        margin: 0;
                        padding: 0;
                        background: none;
                        border-radius: 0;
                        overflow: visible;
                        line-height: 1;
                        float: none;
                    }

                    .rtb {
                        position: relative;
                        display: inline-block;
                        width: max-content;
                        height: auto;
                        margin: 0;
                        padding: 0;
                        overflow: hidden;
                        vertical-align: middle;
                        font-size: 1.15rem;
                        line-height: 1;
                        letter-spacing: 0.14em;
                        color: color-mix(
                            in oklch,
                            var(--muted-foreground) 28%,
                            var(--border)
                        );

                        &::before {
                            content: "★★★★★";
                            display: block;
                            line-height: 1;
                            letter-spacing: inherit;
                            font-family: inherit;
                            font-weight: 400;
                            color: color-mix(
                                in oklch,
                                var(--muted-foreground) 28%,
                                var(--border)
                            );
                        }

                        > span {
                            position: absolute;
                            top: 0;
                            inset-inline-start: 0;
                            width: auto;
                            height: 100%;
                            margin: 0;
                            padding: 0;
                            overflow: hidden;
                            white-space: nowrap;
                            color: #f0b429;
                            background: none;
                            border-radius: 0;

                            &::before {
                                content: "★★★★★";
                                display: block;
                                line-height: 1;
                                letter-spacing: inherit;
                                font-family: inherit;
                                font-weight: 400;
                                color: #f0b429;
                            }
                        }
                    }

                    .custom-rating-value {
                        flex: 0 0 auto;
                        display: inline-flex;
                        align-items: center;
                        justify-content: center;
                        min-width: 3.25rem;
                        padding: 3px 8px;
                        border-radius: 999px;
                        background: color-mix(
                            in oklch,
                            var(--card) 88%,
                            var(--primary) 12%
                        );
                        border: 1px solid
                            color-mix(
                                in oklch,
                                var(--border) 88%,
                                var(--primary) 12%
                            );
                        font-size: 11px;
                        font-weight: 800;
                        font-variant-numeric: tabular-nums;
                        line-height: 1.2;
                        white-space: nowrap;
                        color: var(--foreground);
                        text-align: center;
                    }

                    .custom-rating-reviews-button {
                        display: block;
                        width: 100%;
                        margin: 0;
                        border: none;
                        border-top: 1px solid var(--border);
                        border-radius: 0;
                        background: transparent;
                        color: var(--foreground);
                        padding: 10px 16px;
                        font-size: 12px;
                        font-weight: 700;
                        cursor: pointer;
                        box-sizing: border-box;
                        text-align: center;
                        transition:
                            background-color 0.2s ease,
                            color 0.2s ease;

                        &:hover {
                            background: color-mix(
                                in oklch,
                                var(--foreground) 8%,
                                transparent
                            );
                            color: var(--foreground);
                        }
                    }
                }

                .kol-review-btn {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    padding: 8px 16px;
                    font-size: 12px;
                    font-weight: 700;
                    color: var(--primary);
                    border: 1px solid var(--primary);
                    border-radius: var(--radius-md);
                    text-decoration: none;
                    cursor: pointer;
                    transition:
                        background 0.2s,
                        color 0.2s;

                    &:hover {
                        background: var(--primary);
                        color: var(--primary-foreground);
                    }
                }

                /* النبذة */
                .sersysn {
                    border: var(--novel-panel-border);
                    border-radius: var(--radius-lg);
                    margin-top: 10px;
                    margin-bottom: 0;
                    background: var(--muted);
                    overflow: hidden;

                    .sersys.entry-content {
                        border: none;
                        border-radius: 0;
                        margin-top: 0;
                        padding: 0 14px 10px;
                        background: transparent;
                        font-size: 13px;
                        line-height: 1.7;
                        display: block;
                        position: relative;
                        color: var(--foreground);

                        p {
                            border: none;
                            margin: 0;
                            padding: 0;
                            color: var(--foreground);
                        }
                    }

                    .sysmore {
                        display: block;
                        width: 100%;
                        box-sizing: border-box;
                        padding: 10px 16px;
                        text-align: center;
                        background: transparent;
                        color: var(--foreground);
                        font-weight: 700;
                        font-size: 12px;
                        cursor: pointer;
                        text-decoration: none;
                        border: none;
                        border-top: 1px solid var(--border);
                        transition:
                            background-color 0.2s ease,
                            color 0.2s ease;

                        &:hover {
                            background: color-mix(
                                in oklch,
                                var(--foreground) 8%,
                                transparent
                            );
                            color: var(--foreground);
                        }
                    }
                }

                .kol-series-rating {
                    margin-top: 18px;
                    width: 100%;
                    min-width: 0;
                }

                .kol-series-rating .rating.serrate {
                    display: none;
                }

                .kol-series-rating .custom-rating {
                    margin-top: 0;
                }

                /* الأزرار */
                > div[style*="display:flex"] {
                    display: flex;
                    flex-direction: row;
                    gap: 10px;
                    width: 100%;
                    margin-top: 0;
                    padding: 12px 14px;
                    border: var(--novel-panel-border);
                    border-radius: var(--radius-lg);
                    background: var(--muted);
                    box-sizing: border-box;
                }

                .serbookmark {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    gap: 4px;

                    .bmc {
                        font-size: 11px;
                        color: var(--muted-foreground);
                        opacity: 1;
                        text-align: center;

                        p {
                            margin: 0;
                        }
                    }

                    .bookmark:not(.kol-library-btn) {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        padding: 8px 16px;
                        font-size: 12px;
                        font-weight: 700;
                        color: var(--primary-foreground);
                        background: var(--primary);
                        border: none;
                        border-radius: var(--radius-md);
                        text-align: center;
                        cursor: pointer;
                        transition:
                            background 0.2s,
                            filter 0.2s;

                        &:hover {
                            color: var(--primary-foreground);
                            background: var(--primary);
                            filter: saturate(1.45);
                        }
                    }
                }
            }
        }
    }
}

body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoinfo
    .sertoauth
    .serl
    .sername::before {
    filter: invert(1);
    opacity: 0.9;
}

/* Series action cards (support + library) — matches Starless Edits library button UI. */
.seriestwo .sertobig .insertobig .sertoactions .kol-library-wrap {
    position: relative;
    z-index: 50;
    overflow: visible !important;
    width: 100%;
    margin-top: 0;
}

.seriestwo .sertobig .insertobig .sertoactions .kol-library-btn {
    width: 100% !important;
    min-height: 76px;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 12px 16px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--muted) !important;
    color: var(--foreground) !important;
    font: inherit !important;
    text-align: right;
    box-shadow: none;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.seriestwo .sertobig .insertobig .sertoactions .kol-library-btn:hover {
    transform: translateY(-1px);
    background: var(--accent) !important;
    border-color: color-mix(
        in oklch,
        var(--muted-foreground) 35%,
        var(--border)
    ) !important;
}

.seriestwo .sertobig .insertobig .sertoactions .kol-library-btn > .fas {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 20px;
}

.seriestwo .sertobig .insertobig .sertoactions .kol-library-btn__copy {
    display: grid;
    gap: 4px;
}

.seriestwo .sertobig .insertobig .sertoactions .kol-library-btn__label {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.seriestwo .sertobig .insertobig .sertoactions .kol-library-btn__count {
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 600;
}

.seriestwo
    .sertobig
    .insertobig
    .sertoactions
    .kol-library-btn__count
    .mycred-my-balance-wrapper,
.seriestwo
    .sertobig
    .insertobig
    .sertoactions
    .kol-library-btn__count
    .mycred-my-balance-wrapper
    > div {
    display: inline;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
}

.seriestwo .sertobig .insertobig .sertoactions .kol-library-btn.is-in-library {
    border-color: #75132b !important;
    background: linear-gradient(135deg, #75132b, #9b1738) !important;
    color: #fff !important;
}

.seriestwo
    .sertobig
    .insertobig
    .sertoactions
    .kol-library-btn.is-in-library
    > .fas {
    background: rgba(255, 255, 255, 0.16);
}

.seriestwo
    .sertobig
    .insertobig
    .sertoactions
    .kol-library-btn.is-in-library
    .kol-library-btn__count {
    color: #f7dbe2;
}

body.darkmode .seriestwo .sertobig .insertobig .sertoactions .kol-library-btn {
    border-color: var(--border) !important;
    background: var(--muted) !important;
    box-shadow: none !important;
    color: var(--foreground) !important;
}

body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoactions
    .kol-library-btn__count {
    color: var(--muted-foreground);
}

body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoactions
    .kol-library-btn.is-in-library
    .kol-library-btn__count {
    color: #f7dbe2;
}

/* Theme CSS loads after this file: retain readable dark metadata surfaces. */
body.darkmode .seriestwo .sertobig .insertobig .sertoinfo .sertoauth {
    background: var(--muted);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

body.darkmode .seriestwo .sertobig .insertobig .sertoinfo .sertoauth .serl {
    border: none;
}

body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoinfo
    .sertoauth
    .serl
    .sername {
    background: color-mix(in oklch, var(--card) 36%, transparent);
    color: var(--muted-foreground);
    border-inline-end-color: color-mix(
        in oklch,
        var(--border) 88%,
        transparent
    );
}

body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoinfo
    .sertoauth
    .serl
    .serval {
    color: var(--foreground);
}

body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoinfo
    .sertoauth
    .serl
    .serval
    a {
    color: var(--foreground);
    background: none;
    border: none;
    text-decoration-color: color-mix(
        in oklch,
        var(--foreground) 40%,
        transparent
    );
}

body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoinfo
    .sertoauth
    .serl
    .serval
    a:hover,
body.darkmode
    .seriestwo
    .sertobig
    .insertobig
    .sertoinfo
    .sertoauth
    .serl
    .serval
    a:focus-visible {
    color: color-mix(
        in oklch,
        var(--primary-foreground) 88%,
        var(--foreground)
    );
    background: none;
    border: none;
    text-decoration-color: currentColor;
}

/* موبايل صفحة الرواية */
@media (max-width: 768px) {
    .sertobig {
        max-width: calc(100vw - 1rem);
        margin: 0.75rem auto;
        border-radius: 3px;
    }

    .seriestwo .sertobig .insertobig {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;

        /* Unwrap cover/actions so buttons can sit after all info on mobile. */
        .sertocover-col {
            display: contents;
            width: auto;
            max-width: none;
            position: static;
            top: auto;
        }

        .sertothumb {
            order: 1;
            width: min(250px, 100%);
            max-width: min(250px, 100%);
            min-width: unset;
            float: none;
            margin-inline: auto;
            align-self: center;

            img {
                width: 100%;
                max-width: 250px;
                height: auto;
                margin-inline: auto;
                display: block;
            }
        }

        .sertoinfo {
            order: 2;
            width: 100%;

            .entry-title {
                text-align: center;
            }

            .alter {
                text-align: center;
            }

            .sertoauth .serl {
                grid-template-columns: minmax(7rem, 42%) minmax(0, 1fr);
            }

            .sertoauth .sername {
                white-space: normal;
                font-size: 11px;
            }

            .sertogenre {
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                align-items: center;
                gap: 8px;
                padding: 0 14px 14px;

                &::before {
                    flex: 0 0 100%;
                    width: auto;
                    grid-column: auto;
                    margin: 0 -14px 8px;
                }

                a {
                    float: none !important;
                    display: inline-flex !important;
                    flex: 0 0 auto;
                    width: auto;
                    max-width: 100%;
                    white-space: nowrap;
                }
            }

            > div[style*="display:flex"] {
                flex-direction: column;
                gap: 8px;
            }
        }

        .sertoactions {
            order: 3;
            width: 100%;
            max-width: 100%;
            margin-top: 4px;
            align-self: stretch;
        }
    }
}

.seriestwo .sertoinfo .sertoauth {
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm);
}

.seriestwo .sertoinfo .sertoauth .serl {
    float: none !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

.seriestwo .sertoinfo .sertoauth .serl .serval a {
    display: inline !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    transform: none !important;
}

.seriestwo .sertoinfo .series-card-heading {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    box-sizing: border-box;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.seriestwo .sertoinfo .sersysn > .series-card-heading {
    margin-bottom: 10px;
}

.seriestwo .sertoinfo .sertogenre {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 8px;
    padding: 0 14px 14px;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.seriestwo .sertoinfo .sertogenre-title {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    width: auto;
    min-height: 38px;
    max-width: none;
    padding: 8px 12px;
    box-sizing: border-box;
    margin: 0 -14px 6px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 15px;
    font-weight: 700;
}

.seriestwo .sertoinfo .sertogenre a {
    float: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px;
    padding: 7px 10px !important;
    border: 1px solid
        color-mix(in oklch, var(--border) 82%, var(--foreground) 18%) !important;
    border-radius: 8px !important;
    background: color-mix(
        in oklch,
        var(--muted) 82%,
        var(--foreground) 6%
    ) !important;
    box-shadow: none !important;
    color: var(--muted-foreground) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.35;
    white-space: nowrap;
    transform: none !important;
}

@media (max-width: 480px) {
    .seriestwo .sertoinfo .sertogenre {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.seriestwo .sertoinfo .sertogenre a:hover,
.seriestwo .sertoinfo .sertogenre a:focus-visible {
    border-color: color-mix(
        in oklch,
        var(--primary) 38%,
        var(--border)
    ) !important;
    background: color-mix(in oklch, var(--primary) 9%, var(--muted)) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
    transform: none !important;
}

.seriestwo .sertoinfo .kol-series-rating {
    margin-top: 18px;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--muted) !important;
    box-shadow: var(--shadow-sm) !important;
    overflow: hidden;
    display: flow-root;
    isolation: isolate;
}

/*
 * The comments widget does not always provide an enhanced `.custom-rating`.
 * Keep the server-rendered score visible until a replacement actually exists.
 */
.seriestwo .sertoinfo #kol-series-rating > .rating.serrate {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin: 0;
    box-sizing: border-box;
}

.seriestwo .sertoinfo #kol-series-rating > .rating.serrate .rating-prc {
    flex: 1 1 auto;
    min-width: 0;
}

.seriestwo .sertoinfo #kol-series-rating > .rating.serrate .rtp {
    display: block;
    width: 100%;
    margin: 0;
}

.seriestwo .sertoinfo #kol-series-rating > .rating.serrate .numscore {
    flex: 0 0 auto;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--foreground);
}

.seriestwo .sertoinfo #kol-series-rating:has(.custom-rating) > .rating.serrate {
    display: none !important;
}

.seriestwo .sertoinfo .kol-series-rating .custom-rating {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    background: transparent !important;
}

.seriestwo .sertoinfo .sertogenre + .kol-series-rating {
    margin-top: 18px !important;
}

/* Beat kol-comments runtime styles + parent theme on the hero rating block. */
#kol-series-rating .custom-rating,
.seriestwo .sertoinfo #kol-series-rating .custom-rating {
    display: flex !important;
    gap: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

#kol-series-rating .custom-rating-item,
.seriestwo .sertoinfo #kol-series-rating .custom-rating-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-width: 0 !important;
}

#kol-series-rating .custom-rating-label,
.seriestwo .sertoinfo #kol-series-rating .custom-rating-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: normal !important;
}

#kol-series-rating .custom-rating .rtp,
.seriestwo .sertoinfo #kol-series-rating .custom-rating .rtp {
    flex: 0 0 auto !important;
    float: none !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    background: none !important;
    line-height: 1 !important;
}

#kol-series-rating .custom-rating .rtb,
.seriestwo .sertoinfo #kol-series-rating .custom-rating .rtb {
    display: inline-block !important;
    width: max-content !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.15rem !important;
    line-height: 1 !important;
    letter-spacing: 0.14em !important;
    overflow: hidden !important;
}

#kol-series-rating .custom-rating .rtb > span,
.seriestwo .sertoinfo #kol-series-rating .custom-rating .rtb > span {
    position: absolute !important;
    top: 0 !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    height: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#kol-series-rating .custom-rating .rtb::before,
#kol-series-rating .custom-rating .rtb > span::before,
.seriestwo .sertoinfo #kol-series-rating .custom-rating .rtb::before,
.seriestwo .sertoinfo #kol-series-rating .custom-rating .rtb > span::before {
    display: block !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    letter-spacing: inherit !important;
}

#kol-series-rating .custom-rating-value,
.seriestwo .sertoinfo #kol-series-rating .custom-rating-value {
    flex: 0 0 auto !important;
    margin: 0 !important;
    text-align: center !important;
}

#kol-series-rating .custom-rating,
.seriestwo .sertoinfo #kol-series-rating .custom-rating {
    border: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    #kol-series-rating .custom-rating-item,
    .seriestwo .sertoinfo #kol-series-rating .custom-rating-item {
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    #kol-series-rating .custom-rating-label,
    .seriestwo .sertoinfo #kol-series-rating .custom-rating-label {
        flex: 1 1 auto !important;
        width: auto !important;
        white-space: nowrap !important;
    }

    #kol-series-rating .custom-rating .rtp,
    .seriestwo .sertoinfo #kol-series-rating .custom-rating .rtp {
        flex: 0 1 auto !important;
        margin-inline-start: 0 !important;
    }
}

@media (max-width: 768px) {
    .seriestwo .sertobig .insertobig .sertoinfo .sertogenre a {
        float: none !important;
        display: inline-flex !important;
    }
}

.seriestwo .sertoinfo .sysmore,
.seriestwo .sertoinfo .custom-rating-reviews-button {
    color: var(--foreground) !important;
}

.seriestwo .sertoinfo .custom-rating .custom-rating-reviews-button,
.seriestwo .sertoinfo .kol-series-rating .custom-rating-reviews-button {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 10px 16px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.seriestwo .sertoinfo .sysmore:hover,
.seriestwo .sertoinfo .custom-rating-reviews-button:hover {
    color: var(--foreground) !important;
    background: color-mix(
        in oklch,
        var(--foreground) 8%,
        transparent
    ) !important;
}

/* ── صفحة تسجيل الدخول ── */
body.account {
    body {
        display: flex;
        justify-content: normal;
        min-height: 100vh;
        box-sizing: border-box;
        transition: background-color 0.3s ease;

        &.darkmode {
            .bixbox {
                background: var(--sidebar-primary);
                border-color: var(--border);
                box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
            }
            .releases {
                background: var(--muted);
                border-bottom-color: var(--border);

                h1 {
                    color: var(--primary-foreground);
                }
            }
            .pms-form {
                label {
                    color: var(--primary-foreground);
                    opacity: 0.8;
                }
                .input {
                    background-color: var(--sidebar-accent);
                    border-color: var(--border);
                    color: var(--primary-foreground);

                    &:focus {
                        border-color: var(--ring);
                        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
                    }
                    &:hover {
                        border-color: var(--ring);
                    }
                }
                .login-remember label {
                    color: var(--primary-foreground);
                }
                .login-extra {
                    a {
                        color: var(--primary-foreground);
                        opacity: 0.9;
                    }
                    .separator {
                        color: var(--muted-foreground);
                    }
                }
            }
        }
    }

    .mainholder {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    #content {
        flex: 1;
        display: flex;
        max-width: 100%;
        margin: 20px 0;

        .wrapper {
            flex: 1;
            display: flex;

            .postbody {
                flex: 1;
                display: flex;
                justify-content: center;
                align-items: center;
            }
        }
    }

    #sidebar {
        display: none;
    }

    .bixbox {
        max-width: 450px;
        width: 100%;
        background: #ffffff;
        border-radius: var(--border-radius);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--border);
        overflow: hidden;
        transition:
            background 0.3s ease,
            border-color 0.3s ease,
            box-shadow 0.3s ease;
    }

    .releases {
        background: var(--muted);
        border-bottom: 1px solid var(--border);
        text-align: center;
        transition:
            background 0.3s ease,
            border-bottom-color 0.3s ease;
        display: flex;
        justify-content: center;
        padding: 20px;

        h1 {
            margin: 0;
            font-size: 1.5rem;
            color: var(--foreground);
            transition: color 0.3s ease;
        }
    }

    .page {
        padding: var(--gap-large);

        &:has(#pms_login) > div:last-child {
            display: none;
        }
    }

    .pms-form {
        p {
            margin: 0 0 var(--gap-medium) 0;
            display: flex;
            flex-direction: column;
            gap: var(--gap-small);
        }

        label {
            font-size: var(--font-size-small);
            font-weight: 600;
            color: var(--foreground);
            opacity: 0.7;
            transition:
                color 0.3s ease,
                opacity 0.3s ease;
        }

        .input {
            width: 100%;
            padding: var(--padding-large);
            font-size: 1rem;
            border: 1px solid var(--border);
            border-radius: var(--border-radius);
            background-color: #ffffff;
            box-sizing: border-box;
            transition:
                border-color 0.2s,
                box-shadow 0.2s,
                background-color 0.3s ease,
                color 0.3s ease;

            &:focus {
                outline: none;
                border-color: var(--primary);
                box-shadow: 0 0 0 3px rgba(109, 0, 21, 0.15);
            }
            &:hover {
                border-color: var(--primary);
            }
        }

        .login-remember {
            flex-direction: row-reverse;
            justify-content: flex-end;
            align-items: center;
            gap: var(--gap-medium);
            cursor: pointer;

            input[type="checkbox"] {
                width: 18px;
                height: 18px;
                cursor: pointer;
                margin: 0;
            }

            label {
                cursor: pointer;
                font-weight: 500;
                color: var(--foreground);
                opacity: 1;
            }
        }

        .button-primary {
            width: 100%;
            padding: var(--padding-large);
            font-size: 1rem;
            font-weight: 600;
            color: var(--primary-foreground);
            background-color: var(--primary);
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: opacity 0.2s;

            &:hover {
                opacity: 0.9;
            }
        }

        .login-extra {
            flex-direction: row-reverse;
            justify-content: center;
            gap: var(--gap-medium);
            font-size: var(--font-size-small);
            margin-bottom: 0;

            a {
                color: var(--primary);
                text-decoration: none;
                transition: color 0.3s ease;

                &:hover {
                    text-decoration: underline;
                }
            }

            .separator {
                color: var(--muted-foreground);
                transition: color 0.3s ease;
            }
        }
    }
}



.listupd .utao.styletree .uta ul li {
    a {
        max-width: 70%;
        border-radius: 5px;
    }
}

.chapter-page {
    -webkit-user-select: none; /* Chrome, Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Old Edge/IE */
    user-select: none;
}



/* Homepage latest updates — a quiet editorial release list. */
body .releases.latesthome {
    align-items: center;
    gap: 20px;
    padding: 16px 20px 15px;
    border-top: 3px solid var(--primary);
    border-bottom: 1px solid var(--border);
    background: var(--card);
}

body .releases.latesthome::after {
    display: none;
}

body .releases.latesthome h2,
body .releases.latesthome h3 {
    margin: 0;
    color: var(--foreground);
    font-size: clamp(17px, 1.8vw, 22px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

body .releases.latesthome h2::after,
body .releases.latesthome h3::after {
    display: inline-block;
    width: 28px;
    height: 2px;
    margin-inline-start: 10px;
    background: var(--primary);
    content: "";
    vertical-align: middle;
}

body .releases.latesthome .vl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: none;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 4px 0;
    border: 0;
    border-bottom: 1px solid var(--primary);
    border-radius: 0;
    background: transparent;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    box-shadow: none;
    transition: none;
}

body .releases.latesthome .vl:hover,
body .releases.latesthome .vl:focus-visible {
    background: transparent;
    color: var(--primary);
    outline: none;
    transform: none;
}

body .releases.latesthome + .listupd {
    padding: 18px 20px 22px;
    overflow: visible;
    background: var(--card);
}

body .releases.latesthome + .listupd > .excstf {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 26px;
    row-gap: 0;
    margin: 0;
    overflow: visible;
}

body .releases.latesthome + .listupd > .excstf > .utao.styletree {
    display: block;
    float: none;
    width: auto;
    min-width: 0;
    height: 100%;
    align-self: stretch;
    border-bottom: 1px solid var(--border);
}

body .releases.latesthome + .listupd .utao.styletree .uta,
body .releases.latesthome + .listupd .utao.styletree .uta:hover,
body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    width: 100%;
    height: 100%;
    min-height: 184px;
    box-sizing: border-box;
    padding: 18px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    direction: rtl;
    overflow: visible;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
    position: relative;
    float: none;
    align-self: start;
    justify-self: center;
    width: 92px;
    height: 130px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--muted);
    box-shadow: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu a,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu a:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu img {
    display: block;
    width: 100%;
    height: 100%;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu a:hover {
    opacity: 1;
    transform: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu img {
    object-fit: cover;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    top: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 18px;
    padding: 1px 4px;
    border: 0;
    border-radius: 1px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot {
    inset-inline-end: 6px;
    inset-inline-start: auto;
    background: var(--destructive);
    color: var(--destructive-foreground);
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    inset-inline-start: 6px;
    inset-inline-end: auto;
    background: var(--rating);
    color: var(--foreground);
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf {
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-width: 0;
    overflow: visible;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series,
body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:hover {
    display: block;
    min-width: 0;
    color: var(--foreground);
    text-decoration: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
    list-style: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    box-sizing: border-box;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--foreground);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    float: none;
    overflow: hidden;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--primary);
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: -2px;
}

/* The relative publish time is intentionally omitted to keep each row about its chapter. */
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li span {
    display: none;
}

body .releases.latesthome + .listupd > .hpage {
    display: flex;
    align-items: center;
    justify-content: center;
    clear: both;
    margin: 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    direction: ltr;
    overflow: visible;
}

body .releases.latesthome + .listupd > .hpage a,
body .releases.latesthome + .listupd > .hpage a:hover {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 5px 0;
    border: 0;
    border-bottom: 1px solid var(--primary);
    border-radius: 0;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    box-shadow: none;
    transition: none;
    transform: none;
}

body .releases.latesthome + .listupd > .hpage a:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

@media (min-width: 721px) {
    body .releases.latesthome + .listupd > .excstf > .utao:nth-child(odd) .uta {
        padding-inline-end: 14px;
    }

    body .releases.latesthome + .listupd > .excstf > .utao:nth-child(even) .uta {
        padding-inline-start: 14px;
    }
}

@media (max-width: 720px) {
    body .releases.latesthome + .listupd > .excstf {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    body .releases.latesthome {
        padding: 14px 15px 13px;
    }

    body .releases.latesthome + .listupd {
        padding: 14px 15px 18px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 12px;
        min-height: 0;
        padding: 15px 0;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
        width: 78px;
        height: 110px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf {
        gap: 10px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
        font-size: 14px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li {
        min-height: 32px;
        font-size: 11px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a {
        padding: 7px 0;
    }
}

/* Homepage latest items — compact reading-index rows. The section header above
 * intentionally remains unchanged. */
body .releases.latesthome + .listupd {
    padding: 8px 22px 22px;
}

body .releases.latesthome + .listupd > .excstf {
    column-gap: 30px;
}

body .releases.latesthome + .listupd > .excstf > .utao.styletree {
    border-bottom: 1px solid var(--border);
}

body .releases.latesthome + .listupd .utao.styletree .uta,
body .releases.latesthome + .listupd .utao.styletree .uta:hover,
body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    min-height: 0;
    padding: 15px 0 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
    width: 62px;
    height: 86px;
    border: 0;
    border-inline-start: 3px solid var(--primary);
    border-radius: 0;
    background: var(--muted);
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu img {
    object-fit: cover;
}

/* The local mirror has many missing covers; keep those from dominating the row. */
body .releases.latesthome + .listupd .utao.styletree .uta .imgu .local-cover-fallback {
    min-height: 0;
    background: var(--muted);
    color: transparent;
    font-size: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) {
    background: var(--muted);
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) .local-cover-fallback::after {
    width: 16px;
    height: 2px;
    background: var(--primary);
    content: "";
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) img {
    opacity: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    top: 4px;
    min-width: 16px;
    min-height: 16px;
    padding: 0 3px;
    border-radius: 0;
    font-size: 8px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot {
    inset-inline-end: 4px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    inset-inline-start: 4px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf {
    gap: 8px;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series,
body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:hover {
    color: var(--foreground);
    text-decoration: none;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul {
    position: relative;
    gap: 0;
    margin: 0;
    padding: 3px 0 0;
    border-top: 1px solid var(--border);
    counter-reset: chapter-row;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 29px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    background: transparent;
    color: var(--foreground);
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li::before {
    counter-increment: chapter-row;
    content: counter(chapter-row, decimal-leading-zero);
    color: var(--muted-foreground);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
    display: block;
    min-width: 0;
    padding: 6px 0;
    color: var(--primary);
    font-size: 11px;
    line-height: 1.35;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li span {
    display: none;
}

body .releases.latesthome + .listupd > .hpage {
    margin-top: 0;
    padding-top: 16px;
}

@media (max-width: 480px) {
    body .releases.latesthome + .listupd {
        padding: 6px 15px 18px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta,
    body .releases.latesthome + .listupd .utao.styletree .uta:hover,
    body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 11px;
        padding: 13px 0 14px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
        width: 52px;
        height: 73px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
        font-size: 14px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
        grid-template-columns: 19px minmax(0, 1fr);
        gap: 5px;
        min-height: 27px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
        font-size: 10px;
    }
}

/* One quiet control for the latest list; the child script points it at View All. */
body .releases.latesthome + .listupd > .hpage {
    border-top: 0;
    padding: 18px 0 0;
}

body .releases.latesthome + .listupd > .hpage a.r,
body .releases.latesthome + .listupd > .hpage a.r:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 112px;
    min-height: 34px;
    margin: 0;
    padding: 7px 16px;
    border: 1px solid var(--primary);
    border-radius: 2px;
    background: transparent;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: none;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd > .hpage a.r:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

/* Text-led release ledger: the latest list is about titles and chapters, not covers. */
body .releases.latesthome + .listupd .utao.styletree .uta,
body .releases.latesthome + .listupd .utao.styletree .uta:hover,
body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
    display: block;
    padding: 18px 0 19px;
    direction: rtl;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
    display: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.8fr);
    align-items: start;
    gap: 24px;
    width: 100%;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series,
body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:hover {
    display: block;
    padding: 3px 14px 3px 0;
    border-inline-start: 3px solid var(--primary);
    color: var(--foreground);
    text-decoration: none;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
    margin: 0;
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    border-top: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
    display: block;
    min-height: 0;
    padding: 0 12px;
    border: 0;
    border-inline-start: 1px solid var(--border);
    background: transparent;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:first-child {
    padding-inline-start: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:last-child {
    border-inline-start: 0;
    padding-inline-end: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li::before {
    display: none;
    content: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
    display: block;
    padding: 3px 0;
    color: var(--primary);
    font-size: 11px;
    line-height: 1.45;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

@media (max-width: 720px) {
    body .releases.latesthome + .listupd .utao.styletree .uta .luf {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
    }
}

@media (max-width: 480px) {
    body .releases.latesthome + .listupd .utao.styletree .uta,
    body .releases.latesthome + .listupd .utao.styletree .uta:hover,
    body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
        padding: 15px 0 16px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf {
        gap: 9px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
        font-size: 14px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul {
        grid-template-columns: minmax(0, 1fr);
        border-top: 1px solid var(--border);
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:first-child,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:last-child {
        padding: 0;
        border-inline-start: 0;
        border-bottom: 1px solid var(--border);
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
        padding: 7px 0;
        font-size: 11px;
    }
}

/* Latest items — book-jacket rows with a dedicated chapter index. */
body .releases.latesthome + .listupd {
    padding: 12px 24px 24px;
}

body .releases.latesthome + .listupd > .excstf {
    column-gap: 36px;
    row-gap: 0;
}

body .releases.latesthome + .listupd > .excstf > .utao.styletree {
    border-bottom: 1px solid var(--border);
}

body .releases.latesthome + .listupd .utao.styletree .uta,
body .releases.latesthome + .listupd .utao.styletree .uta:hover,
body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    padding: 20px 0 21px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    direction: rtl;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
    position: relative;
    display: block;
    float: none;
    width: 96px;
    height: 132px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--muted);
    box-shadow: 4px 4px 0 var(--border);
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu a,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu a:hover {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .local-cover-fallback {
    min-height: 0;
    background: var(--muted);
    color: transparent;
    font-size: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) {
    background: var(--muted);
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) img {
    opacity: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) .local-cover-fallback::after {
    width: 24px;
    height: 2px;
    background: var(--primary);
    content: "";
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    top: 7px;
    min-width: 18px;
    min-height: 18px;
    padding: 1px 4px;
    border: 0;
    border-radius: 0;
    font-size: 9px;
    line-height: 1;
    box-shadow: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot {
    inset-inline-end: 7px;
    inset-inline-start: auto;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    inset-inline-start: 7px;
    inset-inline-end: auto;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow: visible;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series,
body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:hover {
    display: block;
    min-width: 0;
    padding: 0 0 9px;
    border: 0;
    border-bottom: 2px solid var(--primary);
    color: var(--foreground);
    text-decoration: none;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
    counter-reset: latest-chapter;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 31px;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
    border-radius: 0;
    background: transparent;
    color: var(--foreground);
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li::before {
    counter-increment: latest-chapter;
    content: counter(latest-chapter, decimal-leading-zero);
    color: var(--muted-foreground);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
    display: block;
    min-width: 0;
    max-width: none;
    padding: 7px 0;
    color: var(--primary);
    font-size: 11px;
    line-height: 1.35;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li span {
    display: none;
}

@media (max-width: 720px) {
    body .releases.latesthome + .listupd > .excstf {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    body .releases.latesthome + .listupd {
        padding: 8px 15px 18px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta,
    body .releases.latesthome + .listupd .utao.styletree .uta:hover,
    body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 14px;
        padding: 16px 0 17px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
        width: 76px;
        height: 105px;
        box-shadow: 3px 3px 0 var(--border);
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf {
        gap: 8px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
        font-size: 14px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series {
        padding-bottom: 7px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
        grid-template-columns: 19px minmax(0, 1fr);
        gap: 6px;
        min-height: 29px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
        padding: 6px 0;
        font-size: 10px;
    }
}

/* Final latest-list guards: full-width chapters and absolutely stable hover states. */
body .releases.latesthome + .listupd > .excstf > .utao.styletree,
body .releases.latesthome + .listupd > .excstf > .utao.styletree:hover,
body .releases.latesthome + .listupd > .excstf > .utao.styletree:focus-within,
body .releases.latesthome + .listupd .utao.styletree .uta,
body .releases.latesthome + .listupd .utao.styletree .uta:hover,
body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
    margin: 0 !important;
    transform: none !important;
    transition: none !important;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul {
    grid-template-columns: minmax(0, 1fr);
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
    width: 100%;
    box-sizing: border-box;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
    width: 100%;
    box-sizing: border-box;
    transform: none !important;
    transition: none !important;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu a:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:hover {
    transform: none !important;
    transition: none !important;
}

/* Latest items — square book cards with a dedicated cover and chapter panel. */
body .releases.latesthome + .listupd {
    padding: 18px 22px 24px;
    background: var(--muted);
}

body .releases.latesthome + .listupd > .excstf {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

body .releases.latesthome + .listupd > .excstf > .utao.styletree {
    align-self: stretch;
    height: auto;
    min-width: 0;
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    background: var(--card);
}

body .releases.latesthome + .listupd .utao.styletree .uta,
body .releases.latesthome + .listupd .utao.styletree .uta:hover,
body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    padding: 17px 16px 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    direction: rtl;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
    position: relative;
    display: block;
    float: none;
    width: 104px;
    height: 142px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--muted);
    box-shadow: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu a,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu a:hover {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .local-cover-fallback {
    min-height: 0;
    background: var(--muted);
    color: transparent;
    font-size: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) {
    background: var(--background);
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) img {
    opacity: 0;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) .local-cover-fallback::after {
    width: 28px;
    height: 3px;
    background: var(--primary);
    content: "";
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"]) .local-cover-fallback::after {
    display: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu:has(img[src*="noimg"])::after {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    color: var(--muted-foreground);
    content: attr(data-cover-title);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot,
body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    top: 7px;
    min-width: 19px;
    min-height: 19px;
    padding: 1px 4px;
    border: 0;
    border-radius: 0;
    font-size: 9px;
    line-height: 1;
    box-shadow: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .hot {
    inset-inline-end: 7px;
    inset-inline-start: auto;
}

body .releases.latesthome + .listupd .utao.styletree .uta .imgu .new {
    inset-inline-start: 7px;
    inset-inline-end: auto;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
    min-width: 0;
    width: 100%;
    overflow: visible;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series,
body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:hover {
    display: block;
    min-width: 0;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid var(--primary);
    color: var(--foreground);
    text-decoration: none;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    align-self: stretch;
    border: 0;
    list-style: none;
    counter-reset: latest-card-chapter;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 0;
    background: transparent;
    color: var(--foreground);
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li::before {
    display: block;
    counter-increment: latest-card-chapter;
    content: counter(latest-card-chapter, decimal-leading-zero);
    color: var(--muted-foreground);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: right;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
    display: block;
    float: none !important;
    min-width: 0;
    max-width: none;
    width: 100%;
    padding: 7px 0;
    overflow: hidden;
    color: var(--foreground);
    font-size: 11px;
    line-height: 1.35;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
    transition: none;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li span {
    display: none;
}

@media (max-width: 720px) {
    body .releases.latesthome + .listupd > .excstf {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    body .releases.latesthome + .listupd {
        padding: 12px 15px 18px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta,
    body .releases.latesthome + .listupd .utao.styletree .uta:hover,
    body .releases.latesthome + .listupd .utao.styletree .uta:focus-within {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 14px;
        padding: 15px 13px 16px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .imgu {
        width: 82px;
        height: 112px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf {
        gap: 8px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf h3 {
        font-size: 14px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf > a.series {
        padding-bottom: 7px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:hover,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li:focus-within {
        grid-template-columns: 19px minmax(0, 1fr);
        gap: 6px;
        min-height: 29px;
    }

    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a,
    body .releases.latesthome + .listupd .utao.styletree .uta .luf ul li a:hover {
        padding: 6px 0;
        font-size: 10px;
    }
}
