/* =========================================================
   2026 UI REFINEMENT â€” shared surfaces, type, and spacing
   ========================================================= */
body,
button,
input,
select,
textarea {
    font-family: var(--ui-font);
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -.035em;
}

.site-header {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-deep)) !important;
    border-bottom: 1px solid rgba(255, 249, 235, .16);
    box-shadow: 0 8px 30px rgba(48, 32, 7, .16);
}

.main-header-menu a {
    font-family: var(--ui-font);
    font-size: .94rem;
    font-weight: 700;
}

.wisetl-homepage,
.wisetl-novel-browser,
.novel-page-container {
    width: min(1180px, calc(100% - 48px));
}

.wisetl-library-container,
.wisetl-profile-container {
    max-width: 1180px;
}

.wisetl-home-section-heading h1,
.wisetl-home-section-heading h2,
.wisetl-library-header h1,
.wisetl-novel-browser-header h1,
.wisetl-profile-heading h1,
.novel-meta > h1 {
    font-weight: 800;
    letter-spacing: -.045em;
}

.wisetl-home-eyebrow,
.wisetl-library-eyebrow,
.wisetl-profile-label {
    color: var(--gold-primary) !important;
    font-family: var(--ui-font);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.wisetl-latest-chapter,
.wisetl-novel-browser-controls,
.wisetl-profile-header,
.wisetl-profile-stat,
.wisetl-profile-section,
.novel-hero {
    border-color: var(--border-color);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface-color) 92%, transparent);
    box-shadow: var(--shadow-soft);
}

.wisetl-latest-chapter {
    min-height: 108px;
    padding: 22px 24px;
    border-left: 3px solid var(--gold-primary);
}

.wisetl-latest-chapter:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
}

.wisetl-home-novel-cover,
.wisetl-library-cover,
.wisetl-browse-cover {
    border-radius: var(--radius-md);
    box-shadow: 0 10px 24px rgba(30, 22, 10, .12);
}

.wisetl-home-novel-card h3,
.wisetl-library-title-row h2,
.wisetl-browse-card h2 {
    font-family: var(--ui-font);
    font-weight: 750;
}

.wisetl-library-toolbar,
.wisetl-novel-browser-controls {
    border: 1px solid var(--border-color);
}

.wisetl-library-tabs {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    box-shadow: 0 5px 18px var(--shadow-color);
}

.wisetl-library-tab {
    font-family: var(--ui-font);
    font-weight: 700;
}

.wisetl-library-tab.active {
    background: var(--gold-primary);
    color: #17120a;
    box-shadow: 0 5px 12px rgba(128, 90, 19, .18);
}

.wisetl-library-sort select,
.wisetl-novel-browser-controls select,
.wisetl-novel-search input {
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-color);
    color: var(--text-color);
}

.wisetl-novel-browser-controls {
    padding: 18px;
}

.wisetl-browse-card-content {
    padding-top: 14px;
}

.novel-hero {
    margin-bottom: 38px;
    padding: 48px;
}

.novel-cover-large {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px rgba(30, 22, 10, .17);
}

.novel-details {
    gap: 12px;
}

.novel-details p {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.novel-details p:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.genre-pill {
    padding: 7px 13px;
    border-color: var(--gold-outline);
    background: var(--gold-tint);
    color: var(--text-color);
    font-family: var(--ui-font);
    font-size: .78rem;
}

.start-reading-btn,
.latest-chapter-btn {
    min-height: 52px;
    border-radius: var(--radius-sm);
    background: var(--gold-primary);
    box-shadow: 0 7px 16px rgba(128, 90, 19, .20);
}

.library-button {
    border-radius: var(--radius-sm);
    font-family: var(--ui-font);
}

.wisetl-profile-header {
    padding: 30px;
}

.wisetl-profile-avatar {
    border: 4px solid var(--gold-tint);
    box-shadow: 0 10px 24px var(--shadow-color);
}

.wisetl-profile-stat,
.wisetl-profile-section {
    border-color: var(--border-color);
    box-shadow: var(--shadow-soft);
}

body.dark-mode .wisetl-latest-chapter,
body.dark-mode .wisetl-novel-browser-controls,
body.dark-mode .wisetl-profile-header,
body.dark-mode .wisetl-profile-stat,
body.dark-mode .wisetl-profile-section,
body.dark-mode .novel-hero,
body.dark-mode .wisetl-library-tabs,
body.dark-mode .wisetl-library-sort select,
body.dark-mode .wisetl-novel-browser-controls select,
body.dark-mode .wisetl-novel-search input {
    background: var(--surface-color);
    border-color: var(--border-color);
}

@media (max-width: 700px) {
    .wisetl-homepage,
    .wisetl-novel-browser,
    .novel-page-container {
        width: min(100% - 32px, 560px);
    }

    .wisetl-home-section + .wisetl-home-section {
        margin-top: 46px;
        padding-top: 42px;
    }

    .wisetl-latest-chapter {
        min-height: 92px;
        padding: 18px;
        border-radius: var(--radius-md);
    }

    .wisetl-library-tabs {
        padding: 4px;
    }

    .wisetl-library-tab {
        min-height: 38px;
        padding: 7px 10px;
        font-size: .82rem;
    }

    .wisetl-novel-browser-controls {
        gap: 10px;
        padding: 12px;
        border-radius: var(--radius-md);
    }

    .novel-hero {
        padding: 26px 18px;
        border-radius: var(--radius-md);
    }

    .wisetl-profile-header {
        padding: 24px 18px;
        border-radius: var(--radius-md);
    }
}

/* A quieter desktop header and a stable Library control row. */
@media (min-width: 922px) {
    :root {
        --header-height: 72px;
    }

    #ast-desktop-header .ast-primary-header-bar,
    #ast-desktop-header .site-primary-header-wrap,
    #ast-desktop-header .ast-builder-grid-row {
        min-height: var(--header-height);
    }

    #ast-desktop-header .main-header-menu > .menu-item > a {
        line-height: var(--header-height);
    }

    #ast-desktop-header .main-header-menu > .menu-item > a::after {
        bottom: -1px;
    }
}

.wisetl-library-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
}

.wisetl-library-toolbar .wisetl-library-tabs {
    width: fit-content;
}

.wisetl-library-sort {
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 700px) {
    /* The blank outlined square was an unrendered mobile appearance toggle. */
    #ast-mobile-header #ast-hf-mobile-menu .menu-item-dark-mode {
        display: none;
    }

    .wisetl-library-toolbar {
        display: flex;
    }
}

