/* =========================================================
   WISETL PROFILE PAGE
========================================================= */

.wisetl-profile-page {

    min-height: 70vh;

    padding:
        calc(var(--header-height) + 55px)
        24px
        100px;

}

.wisetl-profile-container {

    width: 100%;

    max-width: 900px;

    margin: 0 auto;

}


/* =========================================================
   PROFILE HEADER
========================================================= */

.wisetl-profile-header {

    display: flex;

    align-items: center;

    gap: 28px;

    margin-bottom: 35px;

}

.wisetl-profile-avatar {

    width: 120px;

    height: 120px;

    flex: 0 0 120px;

    overflow: hidden;

    border-radius: 50%;

    border: 2px solid var(--gold-primary);

    background: var(--surface-color);

    box-shadow:
        0 8px 25px rgba(0,0,0,0.12);

}

.wisetl-profile-avatar img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

}

.wisetl-profile-heading {

    min-width: 0;

}

.wisetl-profile-label {

    margin: 0 0 7px;

    color: var(--gold-primary);

    font-family: inherit;

    font-size: 0.72rem;

    font-weight: 700;

    letter-spacing: 0.14em;

}

.wisetl-profile-heading h1 {

    margin: 0;

    color: var(--text-color);

    font-size: clamp(2.1rem, 5vw, 3.2rem);

    line-height: 1.1;

    letter-spacing: -0.025em;

}

.wisetl-profile-username {

    margin: 7px 0 0;

    color: var(--text-soft);

    font-size: 0.95rem;

}


/* =========================================================
   PROFILE STATISTICS
========================================================= */

.wisetl-profile-stats {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 14px;

    margin-bottom: 38px;

}

.wisetl-profile-stat {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 105px;

    padding: 20px;

    background: var(--surface-color);

    border: 1px solid var(--border-color);

    border-radius: 14px;

    box-shadow: var(--shadow-soft);

    text-align: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}

.wisetl-profile-stat:hover {

    transform: translateY(-2px);

    border-color:
        rgba(201,164,76,0.4);

    box-shadow: var(--shadow-hover);

}

.wisetl-profile-stat strong {

    color: var(--gold-primary);

    font-family: inherit;

    font-size: 1.65rem;

    line-height: 1.1;

}

.wisetl-profile-stat span {

    margin-top: 7px;

    color: var(--text-soft);

    font-size: 0.8rem;

    font-weight: 600;

}


/* =========================================================
   PROFILE SECTION
========================================================= */

.wisetl-profile-section {

    padding: 26px 28px;

    margin-bottom: 25px;

    background: var(--surface-color);

    border: 1px solid var(--border-color);

    border-radius: 16px;

    box-shadow: var(--shadow-soft);

}

.wisetl-profile-section-header {

    margin-bottom: 22px;

}

.wisetl-profile-section-label {

    margin: 0 0 5px;

    color: var(--gold-primary);

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 0.14em;

}

.wisetl-profile-section h2 {

    margin: 0;

    color: var(--text-color);

    font-size: 1.35rem;

    line-height: 1.3;

}


/* =========================================================
   ACCOUNT DETAILS
========================================================= */

.wisetl-profile-details {

    display: flex;

    flex-direction: column;

}

.wisetl-profile-detail {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

    padding: 15px 0;

    border-bottom:
        1px solid var(--border-color);

}

.wisetl-profile-detail:first-child {

    padding-top: 0;

}

.wisetl-profile-detail:last-child {

    padding-bottom: 0;

    border-bottom: none;

}

.wisetl-profile-detail span {

    color: var(--text-soft);

    font-size: 0.88rem;

}

.wisetl-profile-detail strong {

    max-width: 65%;

    color: var(--text-color);

    font-size: 0.9rem;

    font-weight: 600;

    text-align: right;

    overflow-wrap: anywhere;

}


/* =========================================================
   PROFILE ACTIONS
========================================================= */

.wisetl-profile-actions {

    display: flex;

    align-items: center;

    gap: 12px;

}

.wisetl-profile-action {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 42px;

    padding: 9px 20px;

    border-radius: 10px;

    font-family: inherit;

    font-size: 0.88rem;

    font-weight: 600;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;

}

.wisetl-profile-action:hover {

    transform: translateY(-1px);

}


/* Primary */

.wisetl-profile-action.primary {

    background: var(--gold-primary);

    color: #111 !important;

    border: 1px solid var(--gold-primary);

}

.wisetl-profile-action.primary:hover {

    background: #d5b35b;

    color: #111 !important;

}


/* Secondary */

.wisetl-profile-action.secondary {

    background: transparent;

    color: var(--text-color) !important;

    border:
        1px solid var(--border-color);

}

.wisetl-profile-action.secondary:hover {

    border-color: var(--gold-primary);

    color: var(--gold-primary) !important;

}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode
.wisetl-profile-stat,

body.dark-mode
.wisetl-profile-section {

    background: #181818;

    border-color: #2a2a2a;

}

body.dark-mode
.wisetl-profile-avatar {

    background: #181818;

    border-color: var(--gold-primary);

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .wisetl-profile-page {

        padding:
            calc(var(--header-height) + 32px)
            14px
            70px;

    }


    .wisetl-profile-header {

        flex-direction: column;

        align-items: center;

        gap: 16px;

        margin-bottom: 28px;

        text-align: center;

    }


    .wisetl-profile-avatar {

        width: 100px;

        height: 100px;

        flex-basis: 100px;

    }


    .wisetl-profile-heading h1 {

        font-size: 2rem;

    }


    .wisetl-profile-label {

        font-size: 0.68rem;

    }


    .wisetl-profile-username {

        font-size: 0.85rem;

    }


    .wisetl-profile-stats {

        gap: 8px;

        margin-bottom: 25px;

    }


    .wisetl-profile-stat {

        min-height: 88px;

        padding: 14px 8px;

    }


    .wisetl-profile-stat strong {

        font-size: 1.35rem;

    }


    .wisetl-profile-stat span {

        font-size: 0.7rem;

    }


    .wisetl-profile-section {

        padding: 20px;

        border-radius: 14px;

    }


    .wisetl-profile-section h2 {

        font-size: 1.2rem;

    }


    .wisetl-profile-detail {

        align-items: flex-start;

        flex-direction: column;

        gap: 4px;

        padding: 13px 0;

    }


    .wisetl-profile-detail strong {

        max-width: 100%;

        text-align: left;

    }


    .wisetl-profile-actions {

        flex-direction: column;

        align-items: stretch;

    }


    .wisetl-profile-action {

        width: 100%;

    }

}

/* =========================================================
   CHAPTER COMMENTS
   ========================================================= */
.wisetl-comments {
    clear: both;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 46px 0 0;
    padding: 46px 0 0;
    border-top: 1px solid var(--border-color);
}

.wisetl-comments-header { order: 1; margin-bottom: 20px; }
.wisetl-comments-eyebrow { margin: 0 0 6px; color: var(--gold-primary); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.wisetl-comments-header h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2rem); }
.wisetl-comment-list { order: 3; margin: 0; padding: 0; list-style: none; }
.wisetl-comments > .comment-navigation { order: 4; }
.wisetl-comment { margin: 0; padding: 0; list-style: none; }
.wisetl-comment + .wisetl-comment { margin-top: 18px; }
.wisetl-comment-body { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--surface-color); box-shadow: var(--shadow-soft); }
.wisetl-comment-avatar { width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border-radius: 50%; background: var(--gold-soft); }
.wisetl-comment-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wisetl-comment-content { min-width: 0; flex: 1; }
.wisetl-comment-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.wisetl-comment-author { color: var(--text-color); font-size: .92rem; font-weight: 700; }
.wisetl-comment-author:hover { color: var(--gold-primary); }
.wisetl-comment-meta time { margin-left: 9px; color: var(--text-soft); font-size: .77rem; }
.wisetl-comment-text { margin-top: 7px; color: var(--text-color); font-size: .94rem; line-height: 1.72; overflow-wrap: anywhere; }
.wisetl-comment-text p { margin: 0; }
.wisetl-comment-text.is-deleted { color: var(--text-soft); font-style: italic; }
.wisetl-comment-menu { position: relative; flex: 0 0 auto; }
.wisetl-comment-menu[open] { padding-bottom: 92px; align-self: flex-start; }
.wisetl-comment-menu summary { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: var(--text-soft); cursor: pointer; font-size: 1.3rem; font-weight: 800; line-height: 1; list-style: none; }
.wisetl-comment-menu summary::-webkit-details-marker { display: none; }
.wisetl-comment-menu summary:hover, .wisetl-comment-menu[open] summary { background: var(--gold-soft); color: var(--gold-primary); }
.wisetl-comment-menu-panel { position: absolute; z-index: 5; top: 35px; right: 0; min-width: 120px; padding: 5px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--surface-color); box-shadow: var(--shadow-soft); }
.wisetl-comment-menu-panel button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-color); cursor: pointer; font: inherit; font-size: .82rem; text-align: left; }
.wisetl-comment-menu-panel button:hover { background: var(--gold-soft); }
.wisetl-comment-menu-panel form { margin: 0; }
.wisetl-comment-menu-panel .wisetl-comment-delete-button { color: #bc3f3f; }
.wisetl-comment-edit-dialog { width: min(540px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border-color); border-radius: 16px; background: var(--surface-color); color: var(--text-color); box-shadow: 0 24px 70px rgba(0,0,0,.42); }
.wisetl-comment-edit-dialog::backdrop { background: rgba(0,0,0,.58); }
.wisetl-comment-edit-dialog.is-fallback-open { position: fixed; z-index: 100001; top: 50%; left: 50%; display: block; margin: 0; transform: translate(-50%, -50%); }
.wisetl-comment-modal-backdrop { position: fixed; z-index: 100000; inset: 0; background: rgba(0,0,0,.58); }
.wisetl-comment-edit-dialog form { padding: 20px; }
.wisetl-comment-dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 1.05rem; }
.wisetl-comment-dialog-heading button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-color); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.wisetl-comment-edit-dialog textarea { width: 100%; min-height: 150px; box-sizing: border-box; padding: 12px; border: 1px solid var(--border-color); border-radius: 9px; background: transparent; color: var(--text-color); font: inherit; line-height: 1.6; resize: vertical; }
.wisetl-comment-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.wisetl-comment-dialog-actions button { padding: 9px 14px; border: 0; border-radius: 8px; background: var(--gold-primary); color: #17120a; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 700; }
.wisetl-comment-dialog-actions .wisetl-comment-cancel { background: transparent; color: var(--text-color); border: 1px solid var(--border-color); }
.wisetl-comment-notice { position: fixed; z-index: 100002; top: 50%; left: 50%; width: min(420px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--surface-color); color: var(--text-color); box-shadow: 0 24px 70px rgba(0,0,0,.42); transform: translate(-50%, -50%); }
.wisetl-comment-notice h2 { margin: 0 0 8px; font-size: 1.15rem; }
.wisetl-comment-notice p { margin: 0; color: var(--text-soft); line-height: 1.55; }
.wisetl-comment-notice button { display: block; margin: 18px 0 0 auto; padding: 9px 15px; border: 0; border-radius: 8px; background: var(--gold-primary); color: #17120a; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 700; }
.wisetl-comment-pending { margin: 10px 0 0; color: var(--gold-primary); font-size: .82rem; }
.wisetl-comment-actions { margin-top: 10px; }
.wisetl-comment-actions a { color: var(--gold-primary); font-size: .78rem; font-weight: 700; }
.wisetl-comment .children { margin: 18px 0 0 56px; padding: 0; list-style: none; }
.wisetl-comments-empty { order: 3; padding: 24px; border: 1px dashed var(--border-color); border-radius: 14px; color: var(--text-soft); text-align: center; }
.wisetl-comments-empty p { margin: 0; color: var(--text-soft); }
.wisetl-comment-form-wrap { order: 2; margin: 0 0 22px; padding: 18px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--surface-color); box-shadow: var(--shadow-soft); }
.wisetl-comment-form-wrap .comment-reply-title { margin: 0 0 6px; font-size: 1.25rem; }
.wisetl-comment-form-wrap .logged-in-as { margin: 0 0 18px; color: var(--text-soft); font-size: .85rem; }
.wisetl-comment-form-wrap .logged-in-as a { color: var(--gold-primary); font-weight: 700; }
.wisetl-comment-form-wrap label { display: block; margin-bottom: 8px; color: var(--text-color); font-size: .85rem; font-weight: 700; }
.wisetl-comment-form-wrap textarea { width: 100%; min-height: 120px; padding: 12px 13px; border: 1px solid var(--border-color); border-radius: 8px; background: transparent; color: var(--text-color); font: inherit; line-height: 1.6; resize: vertical; }
.wisetl-comment-form-wrap textarea:focus { border-color: var(--gold-primary); outline: 3px solid rgba(201,164,76,.14); }
.wisetl-comment-form-wrap .form-submit { margin: 14px 0 0; }
.wisetl-comment-form-wrap .submit { padding: 10px 17px; border: 0; border-radius: 9px; background: var(--gold-primary); color: #17120a; font: inherit; font-size: .87rem; font-weight: 700; cursor: pointer; }
.wisetl-comment-form-wrap .submit:hover { background: #d5b35b; }
.wisetl-comment-form-wrap .comment-reply-title small { margin-left: 8px; font-size: .78rem; }
.wisetl-comment-form-wrap .comment-reply-title small a { color: var(--gold-primary); }
.wisetl-patreon-checked { display: block; margin-top: 7px; color: var(--text-soft); font-size: .76rem; }
.wisetl-comment-form-wrap #commentform, .wisetl-comment-form-wrap .comment-form-comment { width: 100%; max-width: none; box-sizing: border-box; }
body.dark-mode .wisetl-comment-body, body.dark-mode .wisetl-comment-form-wrap, body.dark-mode .wisetl-comment-edit-dialog, body.dark-mode .wisetl-comment-menu-panel, body.dark-mode .wisetl-comment-notice { background: #181818; border-color: #2a2a2a; }
@media (max-width: 768px) { .wisetl-comments { margin-top: 28px; padding-top: 28px; } .wisetl-comment-body { padding: 14px; } .wisetl-comment .children { margin-left: 16px; } .wisetl-comment-form-wrap { padding: 14px; } .wisetl-comment-form-wrap .comment-form-comment { margin: 0; } .wisetl-comment-form-wrap .logged-in-as { margin-bottom: 12px; } .wisetl-comment-form-wrap textarea { min-height: 110px; padding: 10px; } }

/* Home and library layout refresh */
.wisetl-homepage { width: min(1180px, calc(100% - 48px)); margin: calc(var(--header-height) + 46px) auto 100px; }
.wisetl-home-section + .wisetl-home-section { margin-top: 82px; padding-top: 72px; border-top: 1px solid var(--border-color); }
.wisetl-home-section-heading { margin-bottom: 26px; }
.wisetl-home-section-heading h1, .wisetl-home-section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.wisetl-home-eyebrow, .wisetl-library-eyebrow { margin: 0 0 8px; color: var(--gold-primary); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.wisetl-home-section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.wisetl-home-section-heading-row > a { color: var(--gold-primary); font-weight: 700; white-space: nowrap; }
.wisetl-latest-chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wisetl-latest-chapter { display: flex; flex-direction: column; gap: 5px; min-height: 96px; padding: 20px 22px; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 14px; color: var(--text-color); box-shadow: var(--shadow-soft); transition: transform .2s ease, border-color .2s ease; }
.wisetl-latest-chapter:hover { transform: translateY(-2px); border-color: var(--gold-primary); }
.wisetl-latest-chapter-novel { color: var(--gold-primary); font-size: .8rem; font-weight: 700; }
.wisetl-latest-updates-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.wisetl-latest-update { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; min-height: 164px; padding: 18px 0; border-bottom: 1px solid var(--border-color); }
.wisetl-latest-update-cover { display: block; align-self: stretch; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, var(--gold-soft), var(--surface-color)); }
.wisetl-latest-update-cover img { width: 100%; height: 100%; min-height: 145px; object-fit: cover; }
.wisetl-latest-update-cover span { display: grid; height: 100%; place-items: center; color: var(--gold-primary); font-size: 1.8rem; }
.wisetl-latest-update-body { min-width: 0; padding: 3px 0; }
.wisetl-latest-update h2 { margin: 0 0 12px; font-size: 1.05rem; line-height: 1.3; }
.wisetl-latest-update h2 a { color: var(--text-color); }
.wisetl-latest-update h2 a:hover { color: var(--gold-primary); }
.wisetl-latest-update-chapters { display: grid; gap: 8px; }
.wisetl-latest-update-chapters a { display: flex; justify-content: space-between; gap: 12px; color: var(--text-color); font-size: .93rem; }
.wisetl-latest-update-chapters a:hover span:first-child { color: var(--gold-primary); }
.wisetl-latest-update-chapters time { flex: 0 0 auto; color: var(--muted-color); font-size: .8rem; white-space: nowrap; }
.wisetl-latest-update-lock { color: var(--gold-primary); font-size: .75em; }
.wisetl-home-novel-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.wisetl-home-novel-cover { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, var(--gold-soft), var(--surface-color)); box-shadow: var(--shadow-soft); }
.wisetl-home-novel-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.wisetl-home-novel-card:hover img { transform: scale(1.04); }
.wisetl-home-novel-cover span { display: grid; height: 100%; place-items: center; color: var(--gold-primary); font-size: 2rem; }
.wisetl-home-novel-card h3 { margin: 12px 2px 0; font-size: .95rem; line-height: 1.35; }
.wisetl-home-novel-card h3 a { color: var(--text-color); }

/* Webnovel-inspired personal shelf */
.wisetl-library-page { padding-top: calc(var(--header-height) + 46px); }
.wisetl-library-container { max-width: 1180px; }
.wisetl-library-header { margin-bottom: 28px; }
.wisetl-library-header h1 { font-size: clamp(2.15rem, 4vw, 3.1rem); }
.wisetl-library-header p:last-child { max-width: none; font-size: 1rem; }
.wisetl-library-tabs { display: flex; width: fit-content; max-width: 100%; gap: 7px; padding: 5px; margin-bottom: 34px; border-radius: 999px; }
.wisetl-library-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 18px; border-radius: 999px; }
.wisetl-library-tab span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; border-radius: 999px; background: var(--gold-soft); color: var(--text-color); font-size: .7rem; }
.wisetl-library-tab.active span { background: rgba(17,17,17,.14); }
.wisetl-library-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 22px; }
.wisetl-library-card { display: flex; flex-direction: column; gap: 0; min-width: 0; min-height: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.wisetl-library-card:hover { transform: none; border-color: transparent; box-shadow: none; }
.wisetl-library-cover { width: 100%; height: auto; aspect-ratio: 2 / 3; flex: none; border: 1px solid var(--border-color); border-radius: 10px; box-shadow: var(--shadow-soft); }
.wisetl-library-card:hover .wisetl-library-cover { border-color: var(--gold-primary); }
.wisetl-library-info { display: block; min-width: 0; }
.wisetl-library-title-row { align-items: center; gap: 6px; margin-top: 12px; }
.wisetl-library-title-row h2 { min-width: 0; margin: 0; font-size: 1rem; line-height: 1.35; }
.wisetl-library-title-row h2 a { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wisetl-library-menu-button { width: 30px; height: 30px; padding-bottom: 5px; color: var(--text-soft); font-size: 1rem; letter-spacing: 1px; }
.wisetl-library-chapter { overflow: hidden; margin-top: 5px; color: var(--text-soft); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.wisetl-progress-wrapper { gap: 8px; margin-top: 11px; padding: 0; }
.wisetl-progress-bar { height: 5px; }
.wisetl-progress-wrapper > span { min-width: 30px; font-size: .72rem; }
.wisetl-continue-button { display: inline-flex; align-items: center; margin-top: 12px; padding: 0; border: 0; border-radius: 0; color: var(--gold-primary) !important; font-size: .82rem; }
.wisetl-continue-button:hover { background: transparent; color: var(--text-color) !important; transform: none; }
.wisetl-library-menu { top: calc(100% - 10px); right: 0; }
.wisetl-library-cover-placeholder { background: linear-gradient(135deg, var(--gold-soft), var(--surface-color)); }

@media (max-width: 1024px) { .wisetl-home-novel-grid, .wisetl-library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .wisetl-homepage { width: min(100% - 32px, 560px); margin-top: calc(var(--header-height) + 28px); } .wisetl-home-section + .wisetl-home-section { margin-top: 54px; padding-top: 50px; } .wisetl-latest-chapters, .wisetl-latest-updates-grid { grid-template-columns: 1fr; } .wisetl-latest-update { grid-template-columns: 84px minmax(0, 1fr); min-height: 126px; gap: 13px; padding: 14px 0; } .wisetl-latest-update-cover img { min-height: 112px; } .wisetl-latest-update h2 { margin-bottom: 9px; font-size: 1rem; } .wisetl-latest-update-chapters { gap: 6px; } .wisetl-latest-update-chapters a { font-size: .88rem; } .wisetl-home-novel-grid, .wisetl-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 14px; } .wisetl-home-section-heading-row { align-items: flex-start; } .wisetl-home-section-heading-row > a { padding-top: 20px; font-size: .82rem; } .wisetl-library-page { padding: calc(var(--header-height) + 28px) 16px 70px; } .wisetl-library-tabs { width: 100%; } .wisetl-library-tab { flex: 1; padding: 8px 12px; } }
@media (max-width: 380px) { .wisetl-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Library controls and novel catalogue */
.wisetl-library-header { margin-bottom: 12px; }
.wisetl-library-header h1 { margin: 0; }
.wisetl-library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.wisetl-library-toolbar .wisetl-library-tabs { margin: 0; }
.wisetl-library-sort, .wisetl-novel-browser-controls label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: .78rem; font-weight: 700; }
.wisetl-library-sort select, .wisetl-novel-browser-controls select { min-height: 38px; padding: 7px 30px 7px 11px; border: 1px solid var(--border-color); border-radius: 9px; background: var(--surface-color); color: var(--text-color); font: inherit; cursor: pointer; }
.wisetl-library-title-row { margin-top: 16px; padding: 0 3px; }
.wisetl-library-chapter, .wisetl-progress-wrapper, .wisetl-continue-button { margin-left: 3px; margin-right: 3px; }

.wisetl-novel-browser { width: min(1180px, calc(100% - 48px)); margin: calc(var(--header-height) + 46px) auto 100px; }
.wisetl-novel-browser-header { margin-bottom: 28px; }
.wisetl-novel-browser-header h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 3.5rem); }
.wisetl-novel-browser-header > p:last-child { margin: 7px 0 0; color: var(--text-soft); }
.wisetl-novel-browser-controls { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--surface-color); box-shadow: var(--shadow-soft); }
.wisetl-novel-search { position: relative; display: block !important; }
.wisetl-novel-search input { width: 100%; min-height: 42px; padding: 10px 42px 10px 13px; border: 1px solid var(--border-color); border-radius: 10px; background: transparent; color: var(--text-color); font: inherit; }
.wisetl-novel-search input:focus { border-color: var(--gold-primary); outline: 3px solid rgba(201,164,76,.14); }
.wisetl-novel-search > span:last-child { position: absolute; top: 10px; right: 13px; color: var(--text-soft); }
.wisetl-novel-browser-controls label > span:first-child { margin-bottom: 3px; }
.wisetl-novel-browser-controls label:not(.wisetl-novel-search) { flex-direction: column; align-items: flex-start; gap: 0; }
.wisetl-novel-result-count { margin: 22px 0 16px; color: var(--text-soft); font-size: .86rem; }
.wisetl-browse-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 22px; transition: opacity .15s ease; }
.wisetl-browse-grid.is-loading { opacity: .5; }
.wisetl-browse-card { min-width: 0; }
.wisetl-browse-cover { display: block; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid var(--border-color); border-radius: 10px; background: linear-gradient(135deg, var(--gold-soft), var(--surface-color)); box-shadow: var(--shadow-soft); }
.wisetl-browse-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.wisetl-browse-card:hover .wisetl-browse-cover { border-color: var(--gold-primary); }
.wisetl-browse-card:hover .wisetl-browse-cover img { transform: scale(1.04); }
.wisetl-browse-cover span { display: grid; height: 100%; place-items: center; color: var(--gold-primary); font-size: 2rem; }
.wisetl-browse-card-content { padding: 13px 3px 0; }
.wisetl-browse-card h2 { margin: 0; font-size: 1rem; line-height: 1.35; }
.wisetl-browse-card h2 a { display: -webkit-box; overflow: hidden; color: var(--text-color); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wisetl-browse-status { margin: 6px 0 0; color: var(--gold-primary); font-size: .76rem; font-weight: 700; }
.wisetl-browse-genres { overflow: hidden; margin: 2px 0 0; color: var(--text-soft); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.wisetl-novel-empty { grid-column: 1 / -1; padding: 55px 20px; border: 1px dashed var(--border-color); border-radius: 14px; color: var(--text-soft); text-align: center; }
body.dark-mode .wisetl-novel-browser-controls { background: #181818; border-color: #2a2a2a; }
body.dark-mode .wisetl-library-sort select, body.dark-mode .wisetl-novel-browser-controls select { background: #181818; border-color: #2a2a2a; }

@media (max-width: 1024px) { .wisetl-browse-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .wisetl-library-toolbar { align-items: stretch; flex-direction: column; } .wisetl-library-sort { justify-content: space-between; } .wisetl-library-sort select { flex: 1; } .wisetl-novel-browser { width: min(100% - 32px, 560px); margin-top: calc(var(--header-height) + 28px); } .wisetl-novel-browser-controls { grid-template-columns: 1fr 1fr; } .wisetl-novel-search { grid-column: 1 / -1; } .wisetl-browse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 14px; } }

/* Mobile navigation: a compact drawer that keeps the desktop gold aesthetic. */
@media (max-width: 700px) {
    :root {
        --header-height: 72px;
    }

    #ast-mobile-header .ast-primary-header-bar {
        min-height: var(--header-height);
        padding: 0 20px;
        border: 0;
        box-shadow: 0 8px 24px rgba(38, 25, 5, .16);
    }

    #ast-mobile-header .ast-builder-grid-row {
        min-height: var(--header-height);
    }

    /* The desktop header has no logo set, so provide a restrained mobile wordmark. */
    #ast-mobile-header .site-branding::before {
        content: "WiseTL";
        color: #fff8e8;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.28rem;
        font-weight: 700;
        letter-spacing: .04em;
    }

    #ast-mobile-header .site-branding {
        display: flex;
        align-items: center;
        min-height: var(--header-height);
    }

    #ast-mobile-header .menu-toggle,
    #ast-mobile-header .ast-mobile-menu-trigger {
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 248, 232, .38);
        border-radius: 12px;
        background: rgba(74, 48, 10, .10);
    }

    #ast-mobile-header .menu-toggle[aria-expanded="true"] {
        background: rgba(255, 248, 232, .14);
        border-color: rgba(255, 248, 232, .7);
    }

    #ast-mobile-header .ast-mobile-header-content {
        overflow: hidden;
        border-radius: 0 0 18px 18px;
        background: linear-gradient(180deg, #9e7727 0%, #8d681f 100%);
        box-shadow: 0 18px 26px rgba(24, 16, 3, .25);
    }

    #ast-mobile-header .main-navigation,
    #ast-mobile-header #ast-hf-mobile-menu {
        padding: 8px 0 12px;
        background: transparent !important;
    }

    #ast-mobile-header #ast-hf-mobile-menu .menu-item {
        margin: 0 12px;
        border: 0;
    }

    #ast-mobile-header #ast-hf-mobile-menu .menu-link {
        min-height: 50px;
        padding: 0 15px !important;
        border: 1px solid transparent;
        border-radius: 10px;
        color: #fff9eb !important;
        font-size: .96rem;
        font-weight: 650;
        letter-spacing: .01em;
    }

    /* Prevent the desktop underline from drawing across the opened menu. */
    #ast-mobile-header #ast-hf-mobile-menu .menu-link::after {
        display: none !important;
    }

    #ast-mobile-header #ast-hf-mobile-menu .current-menu-item > .menu-link {
        border: 1px solid rgba(255, 248, 232, .18);
        border-left: 1px solid rgba(255, 248, 232, .18);
        background: rgba(255, 248, 232, .13);
        color: #fff !important;
        box-shadow: inset 3px 0 0 #f5d575;
    }

    #ast-mobile-header #ast-hf-mobile-menu .menu-link:hover,
    #ast-mobile-header #ast-hf-mobile-menu .menu-link:focus-visible {
        background: rgba(255, 248, 232, .12);
        outline: none;
    }

    #ast-mobile-header #ast-hf-mobile-menu .menu-item-dark-mode {
        min-height: 48px;
        padding: 0 15px;
        border-top: 1px solid rgba(255, 248, 232, .16);
    }

    #ast-mobile-header #dark-mode-toggle {
        width: 38px;
        height: 38px;
        margin-left: 0;
        border: 1px solid rgba(255, 248, 232, .28);
        border-radius: 10px;
        background: rgba(255, 248, 232, .08);
    }

    #ast-mobile-header #dark-mode-toggle::after {
        content: "Appearance";
        margin-left: 9px;
        color: #fff9eb;
        font-family: inherit;
        font-size: .84rem;
        font-weight: 600;
        white-space: nowrap;
    }

    #ast-mobile-header #dark-mode-toggle {
        width: auto;
        min-width: 38px;
        padding: 0 11px;
    }
}

/* Keep interior pages as close to the header as the home page. The header is
   already in the document flow, so adding its height here created a second gap. */
.wisetl-library-page,
.wisetl-profile-page {
    padding-top: 28px;
}

.wisetl-homepage {
    margin-top: 28px;
}

.wisetl-novel-browser {
    margin-top: 28px;
}

@media (max-width: 700px) {
    .wisetl-library-page,
    .wisetl-profile-page {
        padding-top: 22px;
    }

    .wisetl-homepage {
        margin-top: 22px;
    }

    .wisetl-novel-browser {
        margin-top: 22px;
    }
}

/* Astra's default scroll-to-top shortcut is not part of the site interface. */
#ast-scroll-top {
    display: none !important;
}

/* Novel detail page: give the desktop introduction a deliberate, centred focus. */
@media (min-width: 769px) {
    .novel-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 28px;
    }

    .novel-cover-wrapper {
        display: flex;
        justify-content: center;
    }

    .novel-meta {
        width: min(100%, 760px);
    }

    .novel-meta > h1 {
        margin: 0 0 24px;
        text-align: center;
    }
}

/* Keep the two reading destinations together on phones, with a compact shelf button. */
@media (max-width: 600px) {
    .novel-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 22px;
    }

    .novel-actions .start-reading-btn,
    .novel-actions .latest-chapter-btn {
        grid-column: auto;
        width: auto;
        max-width: none;
        min-height: 46px;
        margin: 0;
        padding: 9px 7px;
        border-radius: 11px;
        font-size: .76rem;
        line-height: 1.2;
        text-align: center;
    }

    .novel-actions .library-button {
        grid-column: 1 / -1;
        justify-self: center;
        width: auto;
        min-height: 38px;
        margin-top: 2px;
        padding: 7px 13px;
        border-radius: 9px;
        font-size: .78rem;
        line-height: 1.2;
    }
}

