* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f5f0;
    color: #25231f;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================
   HEADER
========================= */

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e7e2d8;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 42px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #6d3d2e;
    color: #fff;

    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: bold;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-family: Georgia, serif;
    font-size: 21px;
}

.brand-text small {
    margin-top: 2px;
    color: #827c72;
    font-size: 11px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-right: auto;
}

.main-nav a {
    font-size: 14px;
    font-weight: 600;
    color: #575249;
}

.main-nav a:hover {
    color: #6d3d2e;
}

.nav-actions {
    display: flex;
    gap: 10px;
}


/* =========================
   BUTTONS
========================= */

.btn {
    min-height: 42px;
    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 600;

    transition: 0.2s ease;
}

.btn-primary {
    background: #6d3d2e;
    color: #fff;
    border: 1px solid #6d3d2e;
}

.btn-primary:hover {
    background: #563025;
}

.btn-outline {
    background: transparent;
    border: 1px solid #cfc8bd;
}

.btn-outline:hover {
    background: #f2eee7;
}


/* =========================
   HERO
========================= */

.hero {
    padding: 92px 0 78px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 70px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-block;

    margin-bottom: 20px;

    color: #8a5846;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;

    margin: 0 0 24px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(46px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -2px;
}

.hero-description {
    max-width: 650px;

    margin: 0 0 32px;

    color: #6c675e;

    font-family: Georgia, serif;
    font-size: 19px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 12px;
}


/* =========================
   BOOK VISUAL
========================= */

.hero-visual {
    display: flex;
    justify-content: center;
}

.book-display {
    width: 300px;
    height: 430px;

    padding: 42px 34px;

    border-radius: 5px 16px 16px 5px;

    background:
        linear-gradient(
            135deg,
            #4d281e,
            #7a4635
        );

    color: #fff;

    box-shadow:
        -14px 18px 40px rgba(45, 30, 22, 0.18),
        inset 8px 0 12px rgba(0, 0, 0, 0.14);

    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.book-label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

.book-display h2 {
    margin: 18px 0;

    font-family: Georgia, serif;
    font-size: 40px;
    line-height: 1.05;
}

.book-line {
    width: 45px;
    height: 1px;

    margin: 4px auto 18px;

    background: rgba(255,255,255,0.5);
}

.book-author {
    font-family: Georgia, serif;
    font-size: 14px;
    opacity: 0.85;
}


/* =========================
   SECTIONS
========================= */

.section {
    padding: 70px 0;
}

.section-white {
    background: #fff;
}

.section-heading {
    margin-bottom: 35px;
}

.section-heading span {
    color: #8a5846;

    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 8px 0 0;

    font-family: Georgia, serif;
    font-size: 36px;
}


/* =========================
   EMPTY / FUTURE BOOK GRID
========================= */

.empty-library {
    padding: 50px;

    border: 1px dashed #cfc8bd;
    border-radius: 14px;

    text-align: center;
    color: #777168;

    background: #faf9f6;
}

.empty-library h3 {
    margin-top: 0;

    font-family: Georgia, serif;
    color: #35312b;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    padding: 40px 0;

    background: #25211d;
    color: #d9d3ca;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-footer strong {
    font-family: Georgia, serif;
    font-size: 20px;
}

.site-footer p {
    margin: 6px 0 0;
    color: #999188;
    font-size: 13px;
}

.footer-copy {
    color: #999188;
    font-size: 13px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 800px) {

    .nav-container {
        flex-wrap: wrap;
        padding: 15px 0;
        gap: 18px;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

    .nav-actions {
        margin-left: auto;
    }

    .hero {
        padding-top: 55px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .hero h1 {
        font-size: 50px;
    }

    .hero-visual {
        justify-content: flex-start;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* =========================
   AUTHENTICATION
========================= */

.auth-section {
    min-height: calc(100vh - 76px);
    padding: 70px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border: 1px solid #e5dfd5;
    border-radius: 16px;
    padding: 42px;
    box-shadow: 0 18px 50px rgba(45, 35, 28, 0.08);
}

.auth-heading {
    margin-bottom: 30px;
}

.auth-heading span {
    color: #8a5846;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin: 8px 0 10px;
    font-family: Georgia, serif;
    font-size: 34px;
}

.auth-heading p {
    margin: 0;
    color: #777168;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #454038;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #d6d0c7;
    border-radius: 9px;
    background: #fff;
    color: #292621;
    font: inherit;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #8a5846;
    box-shadow: 0 0 0 3px rgba(138, 88, 70, 0.10);
}

.auth-submit {
    width: 100%;
    border: 0;
    cursor: pointer;
    margin-top: 4px;
}

.auth-footer {
    margin-top: 25px;
    padding-top: 22px;
    border-top: 1px solid #eee9e1;
    text-align: center;
    color: #777168;
    font-size: 14px;
}

.auth-footer a {
    color: #6d3d2e;
    font-weight: 700;
}

.alert {
    padding: 13px 15px;
    margin-bottom: 22px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-error {
    background: #fff1ef;
    border: 1px solid #efcbc5;
    color: #873c31;
}


/* =========================
   DASHBOARD TEMPORARY BASE
========================= */

.dashboard-section {
    min-height: 600px;
    padding: 70px 0;
}

.dashboard-section h1 {
    margin-top: 0;
    font-family: Georgia, serif;
    font-size: 38px;
}

/* =========================
   LOGGED-IN NAV
========================= */

.user-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-nav-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #514c44;
}


/* =========================
   PASSWORD
========================= */

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);

    padding: 5px;

    border: 0;
    background: transparent;

    color: #6d3d2e;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.password-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 16px;

    margin-top: 12px;
}

.password-rule,
.password-match {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #8b857c;

    font-size: 12px;
    line-height: 1.4;

    transition: color 0.2s ease;
}

.password-match {
    margin-top: 10px;
}

.rule-icon {
    width: 16px;
    flex: 0 0 16px;

    font-weight: 700;
    text-align: center;
}

.password-rule.valid,
.password-match.valid {
    color: #38704b;
}


/* =========================
   TOAST
========================= */

.app-toast {
    position: fixed;
    top: 92px;
    right: 24px;

    z-index: 5000;

    min-width: 300px;
    max-width: 430px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    background: #fff;

    border: 1px solid #e3ddd4;
    border-radius: 11px;

    box-shadow:
        0 14px 40px rgba(38, 31, 26, 0.16);

    opacity: 0;
    transform: translateY(-12px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.app-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    width: 27px;
    height: 27px;

    flex: 0 0 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-weight: 700;
}

.app-toast-success .toast-icon {
    background: #e8f4eb;
    color: #337247;
}

.app-toast-error .toast-icon {
    background: #fbe9e6;
    color: #9b4336;
}

.toast-message {
    color: #454038;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}


/* =========================
   READER DASHBOARD
========================= */

.reader-dashboard {
    min-height: calc(100vh - 76px);
    padding: 70px 0 90px;
}

.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;

    padding-bottom: 42px;

    border-bottom: 1px solid #e4ded5;
}

.dashboard-eyebrow {
    color: #8a5846;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.dashboard-welcome h1 {
    max-width: 720px;

    margin: 9px 0 12px;

    font-family: Georgia, serif;
    font-size: 42px;
    line-height: 1.15;
}

.dashboard-welcome p {
    margin: 0;

    color: #756f66;

    font-family: Georgia, serif;
    font-size: 17px;
}

.library-section {
    padding-top: 50px;
}

.library-heading span {
    color: #8a5846;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.library-heading h2 {
    margin: 7px 0 25px;

    font-family: Georgia, serif;
    font-size: 30px;
}

.library-empty {
    min-height: 300px;

    padding: 55px 30px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px dashed #cec7bc;
    border-radius: 15px;

    background: #fbfaf7;

    text-align: center;
}

.library-empty-icon {
    width: 54px;
    height: 54px;

    margin-bottom: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: #6d3d2e;
    color: #fff;

    font-family: Georgia, serif;
    font-size: 28px;
}

.library-empty h3 {
    margin: 0 0 9px;

    font-family: Georgia, serif;
    font-size: 23px;
}

.library-empty p {
    max-width: 430px;

    margin: 0 0 23px;

    color: #777168;
    line-height: 1.6;
}

.toast-close {
    margin-left: auto;
    padding: 0 2px;

    border: 0;
    background: transparent;

    color: #8b857c;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}

.toast-close:hover {
    color: #3f3a34;
}

.app-toast-warning .toast-icon {
    background: #fff3d8;
    color: #946b17;
}

.app-toast-info .toast-icon {
    background: #e9f1f7;
    color: #38627d;
}

@media (max-width: 700px) {

    .password-requirements {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-welcome h1 {
        font-size: 34px;
    }

    .app-toast {
        top: 85px;
        left: 14px;
        right: 14px;

        min-width: 0;
        max-width: none;
    }
}


@media (max-width: 520px) {

    .container {
        width: min(100% - 28px, 1180px);
    }

    .brand-text small {
        display: none;
    }

    .nav-actions .btn {
        padding: 0 12px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-description {
        font-size: 17px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .book-display {
        width: 250px;
        height: 360px;
    }
}

.otp-resend {
    text-align: center;
}

.otp-resend form {
    display: inline;
    margin: 0;
}

.otp-resend-button {
    appearance: none;
    -webkit-appearance: none;

    display: inline;

    margin: 0;
    padding: 0;

    border: 0;
    outline: 0;
    background: transparent;

    font: inherit;
    font-weight: 600;

    color: #6d3d2e;

    cursor: pointer;
    text-decoration: none;

    margin-left: 4px;
}

.otp-resend-button:hover {
    color: #4f2b21;
    text-decoration: underline;
}

.otp-resend-button:focus-visible {
    outline: 2px solid #6d3d2e;
    outline-offset: 3px;
    border-radius: 2px;
}

/* =========================================================
   STICKY FOOTER LAYOUT
   ========================================================= */

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* AUTHOR APPLICATION */
.reader-dashboard-actions { display:flex; gap:12px; flex-wrap:wrap; }
.author-application-wrap { max-width:900px; }
.author-application-card {
    margin-top:28px; padding:28px; background:#fff; border:1px solid #e5ded6;
    border-radius:12px;
}
.author-application-card textarea {
    width:100%; padding:12px; border:1px solid #d8d1c8; border-radius:8px;
    font:inherit; resize:vertical; background:#fff; color:#403a35;
}
.author-application-card .form-group { margin-bottom:20px; }
.author-application-card .form-group label { display:block; margin-bottom:8px; font-weight:700; }
.author-application-card .form-group small { color:#817970; }
.application-status {
    display:inline-flex; padding:6px 10px; border-radius:999px; font-size:11px;
    font-weight:700; text-transform:uppercase; letter-spacing:.4px;
}
.application-status.pending { background:#fff4d6; color:#8a6115; }
.application-status.approved { background:#e8f5ec; color:#2f6b42; }
.application-status.rejected { background:#f9e7e4; color:#8a3e34; }
.application-summary { margin:22px 0 0; display:grid; gap:12px; }
.application-summary div { display:grid; grid-template-columns:130px 1fr; gap:12px; }
.application-summary dt { color:#817970; font-weight:700; }
.application-summary dd { margin:0; }


/* =========================
   AUTHOR WORKSPACE
========================= */
.author-dashboard { min-height:calc(100vh - 76px); padding:70px 0 90px; }
.author-stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin:34px 0; }
.author-stat-card { background:#fff; border:1px solid #e4ded5; border-radius:14px; padding:22px; }
.author-stat-card span { display:block; color:#817970; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; }
.author-stat-card strong { display:block; margin-top:8px; font-family:Georgia,serif; font-size:34px; color:#2f2924; }
.author-workspace-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,1fr); gap:24px; }
.author-panel,.author-form-card,.novel-workspace-card { background:#fff; border:1px solid #e4ded5; border-radius:14px; padding:28px; }
.author-panel-heading,.author-page-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:25px; margin-bottom:28px; }
.author-panel-heading h2,.author-page-heading h1 { margin:6px 0 0; font-family:Georgia,serif; }
.author-page-heading h1 { font-size:38px; }
.author-page-heading p { margin:8px 0 0; color:#756f66; }
.author-novel-list { display:grid; }
.author-novel-row { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:18px 0; border-top:1px solid #eee8e0; color:inherit; text-decoration:none; }
.author-novel-row:first-child { border-top:0; }
.author-novel-row strong,.author-novel-row span { display:block; }
.author-novel-row div span { margin-top:5px; color:#817970; font-size:12px; }
.author-status { display:inline-flex!important; width:max-content; padding:5px 9px; border-radius:999px; background:#eee9e3; color:#625b53; font-size:10px!important; font-weight:800; text-transform:uppercase; letter-spacing:.5px; }
.author-status.published { background:#e8f5ec; color:#2f6b42; }
.author-status.pending_review { background:#fff4d6; color:#8a6115; }
.author-status.returned { background:#f9e7e4; color:#8a3e34; }
.author-profile-panel p { color:#6f6961; line-height:1.7; }
.author-empty-state { text-align:center; padding:42px 20px; }
.author-empty-large { margin-top:28px; background:#fff; border:1px dashed #cec7bc; border-radius:15px; }
.author-empty-mark,.author-book-cover { display:flex; align-items:center; justify-content:center; background:#754332; color:#fff; font-family:Georgia,serif; }
.author-empty-mark { width:44px; height:44px; border-radius:11px; margin:0 auto 15px; font-size:22px; }
.author-empty-state h3,.author-empty-state h2 { font-family:Georgia,serif; margin:0 0 8px; }
.author-empty-state p { color:#817970; margin:0 auto 20px; max-width:520px; line-height:1.6; }
.author-form-shell { max-width:1000px; }
.author-form-card .form-group { margin-bottom:22px; }
.author-form-card label { display:block; margin-bottom:8px; font-weight:700; }
.author-form-card input,.author-form-card textarea { width:100%; padding:12px 13px; border:1px solid #d8d1c8; border-radius:8px; font:inherit; background:#fff; color:#332e29; box-sizing:border-box; }
.author-form-card textarea { resize:vertical; }
.form-grid-two { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.genre-check-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.genre-check { display:flex!important; align-items:center; gap:9px; padding:11px 12px; border:1px solid #e1dad2; border-radius:8px; font-weight:500!important; }
.genre-check input { width:auto!important; margin:0; }
.author-form-actions { display:flex; justify-content:flex-end; padding-top:8px; }
.author-library-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.author-book-card { display:flex; gap:17px; padding:18px; background:#fff; border:1px solid #e4ded5; border-radius:13px; color:inherit; text-decoration:none; }
.author-book-cover { width:72px; min-width:72px; height:100px; border-radius:8px; font-size:28px; }
.author-book-info h2 { margin:9px 0 5px; font-family:Georgia,serif; font-size:20px; }
.author-book-info p,.author-book-info small { color:#817970; }
.novel-workspace-meta { display:flex; gap:12px; align-items:center; flex-wrap:wrap; color:#817970; font-size:13px; }
.novel-workspace-card h2 { font-family:Georgia,serif; margin-top:28px; }
.novel-workspace-card p { line-height:1.7; }
.novel-next-actions { margin-top:30px; padding-top:25px; border-top:1px solid #eee7df; }
.feature-coming { display:inline-block; margin-top:8px; color:#8a5846; font-size:12px; font-weight:700; }
@media(max-width:900px){
 .author-stats-grid{grid-template-columns:repeat(2,1fr)}
 .author-workspace-grid{grid-template-columns:1fr}
 .author-library-grid{grid-template-columns:1fr}
}
@media(max-width:640px){
 .author-stats-grid,.form-grid-two,.genre-check-grid{grid-template-columns:1fr}
 .author-page-heading,.dashboard-welcome{align-items:flex-start;flex-direction:column}
}

/* MANUSCRIPT / CHAPTER MANAGEMENT */
.chapter-actions-head{display:flex;justify-content:space-between;align-items:center;gap:24px}
.chapter-action-buttons,.preview-actions{display:flex;gap:10px;flex-wrap:wrap}
.workspace-chapter-list{margin-top:20px;border-top:1px solid #eee7df}
.workspace-chapter-row{display:flex;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid #eee7df}
.workspace-chapter-row>span{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#f1ebe5;color:#754332;font-weight:800}
.workspace-chapter-row strong,.workspace-chapter-row small{display:block}
.workspace-chapter-row small{margin-top:3px;color:#817970}
.chapter-empty{margin-top:20px;padding:22px;border:1px dashed #d6cec5;border-radius:10px;color:#817970;text-align:center}
.manuscript-drop{text-align:center;padding:40px 24px;border:2px dashed #d7cec5;border-radius:12px;background:#fbf9f6}
.manuscript-drop input[type=file]{margin-top:18px;padding:12px;background:#fff}
.import-note,.import-warning{margin:18px 0;padding:14px 16px;border-radius:9px;background:#fff5df;color:#72521c;line-height:1.5}
.chapter-preview-list{display:grid;gap:18px}
.chapter-preview-card{background:#fff;border:1px solid #e4ded5;border-radius:14px;padding:24px}
.chapter-preview-number{font-size:11px;font-weight:800;letter-spacing:.7px;text-transform:uppercase;color:#8a5846;margin-bottom:14px}
.chapter-preview-card label{display:block;font-weight:700;margin-top:14px}
.chapter-preview-card input,.chapter-preview-card textarea{width:100%;box-sizing:border-box;margin-top:7px;padding:12px;border:1px solid #d8d1c8;border-radius:8px;font:inherit}
.chapter-preview-card textarea{resize:vertical;line-height:1.6}
.preview-actions{justify-content:flex-end;margin-top:22px}
@media(max-width:700px){.chapter-actions-head{align-items:flex-start;flex-direction:column}}

/* Chapter management */
.chapter-main{flex:1;min-width:0}.chapter-main strong,.chapter-main small{display:block}.chapter-actions{margin-left:auto;display:flex;gap:.5rem}.btn-sm{padding:.5rem .75rem;font-size:.82rem}.chapter-editor-card{max-width:980px}.chapter-editor-card label{display:block;font-weight:700;margin-bottom:1rem}.chapter-editor-card input,.chapter-editor-card textarea{display:block;width:100%;margin-top:.45rem}.chapter-editor-card textarea{min-height:560px;resize:vertical;line-height:1.7;font-family:inherit}.form-actions{display:flex;gap:.65rem;align-items:center;justify-content:flex-end;flex-wrap:wrap}.reader-preview-card{max-width:820px;margin:1.5rem auto 4rem;background:#fff;border:1px solid #e8e1da;border-radius:16px;padding:3rem 3.5rem}.reader-preview-kicker{text-align:center;font-size:.75rem;letter-spacing:.14em;font-weight:700;color:#7a4a39}.reader-preview-card h2{text-align:center;margin:.65rem 0 2.25rem}.reader-preview-body{font-family:Georgia,'Times New Roman',serif;font-size:1.08rem;line-height:1.9}.reader-preview-body p{margin:0 0 1.25rem}@media(max-width:720px){.workspace-chapter-row{flex-wrap:wrap}.chapter-actions{width:100%;padding-left:2.75rem}.reader-preview-card{padding:2rem 1.25rem}}

/* Chapter Preview layout correction */
.chapter-preview-shell{
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
  padding:48px 0 72px;
}
.chapter-preview-heading{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  margin-bottom:30px;
}
.chapter-preview-heading h1{
  margin:6px 0 6px;
}
.chapter-preview-heading p{
  margin:0;
}
.chapter-preview-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-shrink:0;
}
.chapter-preview-shell .reader-preview-card{
  width:min(760px,100%);
  box-sizing:border-box;
  margin:0 auto;
}
@media(max-width:720px){
  .chapter-preview-shell{width:min(100% - 28px,1180px);padding-top:28px}
  .chapter-preview-heading{flex-direction:column}
  .chapter-preview-actions{width:100%;justify-content:flex-start}
}

/* Publishing + public reader */
.publish-novel-form{margin-left:auto}.published-view-link{margin-left:auto}
.public-library,.novel-public{padding:64px 0 90px;min-height:calc(100vh - 76px)}
.public-page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:30px}.public-page-heading h1,.novel-public h1{font-family:Georgia,serif;font-size:42px;margin:6px 0}.public-page-heading p{color:#756f66;margin:0}
.browse-search{display:flex;gap:9px}.browse-search input{width:320px;max-width:55vw;padding:11px 13px;border:1px solid #d8d1c8;border-radius:8px;font:inherit}
.public-novel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.public-novel-card{display:flex;gap:20px;padding:22px;background:#fff;border:1px solid #e4ded5;border-radius:14px;color:inherit;text-decoration:none}.public-cover,.novel-public-cover{display:flex;align-items:center;justify-content:center;background:#754332;color:#fff;font-family:Georgia,serif}.public-cover{width:110px;min-width:110px;height:155px;border-radius:9px;font-size:42px}.public-novel-info h2{font-family:Georgia,serif;margin:8px 0 5px}.public-novel-info p{line-height:1.55;color:#625b53}.story-meta,.public-novel-info small{font-size:12px;color:#817970}.story-author{font-weight:700!important;color:#754332!important}
.novel-public-hero{display:grid;grid-template-columns:220px 1fr;gap:38px;align-items:center;padding:34px;background:#fff;border:1px solid #e4ded5;border-radius:16px}.novel-public-cover{width:220px;height:310px;border-radius:12px;font-size:78px}.novel-public-copy h1{margin-bottom:6px}.novel-subtitle{font-family:Georgia,serif;font-size:20px;color:#756f66}.novel-public-meta{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.novel-public-meta span{padding:6px 10px;border-radius:999px;background:#f1ebe5;color:#625b53;font-size:12px}
.novel-detail-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,.8fr);gap:28px;margin-top:28px}.novel-about,.public-chapter-panel{background:#fff;border:1px solid #e4ded5;border-radius:14px;padding:28px}.novel-about h2,.public-chapter-panel h2{font-family:Georgia,serif}.novel-about p{line-height:1.8}.public-chapter-panel a{display:flex;gap:12px;align-items:center;padding:13px 0;border-top:1px solid #eee7df;color:inherit;text-decoration:none}.public-chapter-panel a span{width:30px;height:30px;border-radius:50%;background:#f1ebe5;display:flex;align-items:center;justify-content:center;color:#754332;font-weight:800}
.reader-page{width:min(1100px,calc(100% - 40px));margin:0 auto;padding:38px 0 80px}.reader-topbar{display:flex;justify-content:space-between;gap:20px;color:#756f66;margin-bottom:24px}.reader-topbar a{color:#754332;font-weight:700;text-decoration:none}.reader-story{width:min(760px,100%);box-sizing:border-box;margin:0 auto;background:#fff;border:1px solid #e8e1da;border-radius:16px;padding:52px 58px}.reader-story h1{text-align:center;font-family:Georgia,serif;margin:8px 0 34px}.reader-story-body{font-family:Georgia,'Times New Roman',serif;font-size:1.08rem;line-height:1.9}.reader-story-body p{margin:0 0 1.3rem}.reader-chapter-nav{width:min(760px,100%);margin:24px auto 0;display:flex;justify-content:space-between;gap:12px}
.continue-grid,.home-story-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.continue-card,.home-story-card{display:flex;gap:15px;padding:20px;background:#fff;border:1px solid #e4ded5;border-radius:13px;color:inherit;text-decoration:none}.continue-card{display:block}.continue-card span{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:#8a5846;font-weight:800}.continue-card h3,.home-story-card h3{font-family:Georgia,serif;margin:8px 0}.continue-card p,.home-story-card p{color:#756f66;line-height:1.5}.home-story-mark{width:48px;min-width:48px;height:68px;border-radius:7px;background:#754332;color:#fff;display:flex;align-items:center;justify-content:center;font-family:Georgia,serif;font-size:24px}
@media(max-width:800px){.public-page-heading{align-items:flex-start;flex-direction:column}.public-novel-grid,.novel-detail-grid,.continue-grid,.home-story-grid{grid-template-columns:1fr}.novel-public-hero{grid-template-columns:1fr}.novel-public-cover{width:150px;height:210px}.reader-story{padding:34px 24px}.browse-search{width:100%}.browse-search input{width:100%;max-width:none}}

/* Proper workspace status/action row */
.novel-workspace-meta{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  flex-wrap:nowrap !important;
  width:100%;
  margin-bottom:22px;
}
.novel-workspace-meta .author-status{
  flex:0 0 auto;
}
.novel-workspace-meta > span:not(.author-status){
  flex:0 0 auto;
}
.novel-workspace-meta .publish-novel-form{
  display:block !important;
  margin:0 0 0 auto !important;
  padding:0 !important;
  width:auto !important;
}
.novel-workspace-meta .publish-novel-form .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto !important;
  min-height:38px;
  margin:0 !important;
  padding:9px 16px;
  white-space:nowrap;
  font-size:13px;
}
.novel-workspace-meta .published-view-link{
  margin-left:auto !important;
  white-space:nowrap;
}
@media(max-width:640px){
  .novel-workspace-meta{flex-wrap:wrap !important}
  .novel-workspace-meta .publish-novel-form,
  .novel-workspace-meta .published-view-link{
    margin:8px 0 0 !important;
    width:100% !important;
  }
}
/* Chapter illustrations */
.illustration-upload-card,.illustration-manager{max-width:1100px;margin:0 auto 24px}.illustration-upload-card h2,.illustration-manager h2{font-family:Georgia,serif;margin-top:0}.illustration-upload-card>p,.illustration-manager-head p{color:#756f66}.illustration-upload-form{display:grid;grid-template-columns:1.1fr .35fr 1.2fr 1fr auto;gap:14px;align-items:end}.illustration-upload-form label,.illustration-fields label{font-size:12px;font-weight:700;color:#514b45}.illustration-upload-form label span{font-weight:400;color:#8b837a}.illustration-upload-form input,.illustration-upload-form select,.illustration-fields input,.illustration-fields select{display:block;width:100%;box-sizing:border-box;margin-top:6px;padding:10px 11px;border:1px solid #d8d1c8;border-radius:8px;background:#fff;font:inherit}.illustration-manager-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.illustration-list{display:grid;gap:16px}.illustration-item{display:grid;grid-template-columns:210px 1fr auto;gap:20px;align-items:start;padding:16px;border:1px solid #e5ded6;border-radius:12px;background:#fff}.illustration-item>img{display:block;width:210px;aspect-ratio:16/9;object-fit:cover;border-radius:9px;background:#eee}.illustration-fields>strong,.illustration-fields>small{display:block}.illustration-fields>small{color:#8a8178;margin:3px 0 12px}.illustration-field-grid{display:grid;grid-template-columns:.45fr 1.35fr .45fr;gap:10px}.illustration-field-grid .wide{grid-column:1/-1}.illustration-delete{align-self:start}.story-illustration{margin:2rem -2rem 2.1rem}.story-illustration img{display:block;width:100%;height:auto;border-radius:10px;box-shadow:0 8px 28px rgba(36,25,18,.12)}.reader-story .story-illustration{margin-left:-58px;margin-right:-58px}.reader-preview-card .story-illustration{margin-left:-3.5rem;margin-right:-3.5rem}@media(max-width:900px){.illustration-upload-form{grid-template-columns:1fr 1fr}.illustration-upload-form .btn{width:max-content}.illustration-item{grid-template-columns:160px 1fr}.illustration-item>img{width:160px}.illustration-delete{grid-column:2}.illustration-field-grid{grid-template-columns:1fr 1fr}}@media(max-width:640px){.illustration-upload-form,.illustration-item,.illustration-field-grid{grid-template-columns:1fr}.illustration-item>img{width:100%}.illustration-delete,.illustration-field-grid .wide{grid-column:1}.story-illustration,.reader-story .story-illustration,.reader-preview-card .story-illustration{margin-left:-24px;margin-right:-24px}}

/* Chapter Illustrations — actual Author Workspace layout */
.author-dashboard .illustration-upload-card,
.author-dashboard .illustration-manager{
  max-width:none;
  width:100%;
  box-sizing:border-box;
  margin:0 0 24px;
}
.author-dashboard .illustration-upload-card h2,
.author-dashboard .illustration-manager h2{
  margin:0 0 7px;
}
.author-dashboard .illustration-upload-card > p,
.author-dashboard .illustration-manager-head p{
  margin:0 0 22px;
}
.author-dashboard .illustration-upload-form{
  display:grid;
  grid-template-columns:minmax(180px,1.15fr) 90px minmax(230px,1.45fr) minmax(210px,1.2fr) auto;
  gap:14px;
  align-items:end;
}
.author-dashboard .illustration-upload-form label{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin:0;
  min-width:0;
}
.author-dashboard .illustration-upload-form input,
.author-dashboard .illustration-upload-form select{
  margin:0;
  min-height:42px;
}
.author-dashboard .illustration-upload-form .btn{
  min-height:42px;
  white-space:nowrap;
}
.author-dashboard .illustration-manager{
  margin-top:22px;
}
.author-dashboard .illustration-manager-head{
  margin-bottom:20px;
}
.author-dashboard .chapter-empty{
  padding:36px 22px;
  text-align:center;
  border:1px dashed #d7cfc5;
  border-radius:10px;
  color:#817970;
  background:#fbfaf8;
}
@media(max-width:1050px){
  .author-dashboard .illustration-upload-form{
    grid-template-columns:1fr 110px 1fr;
  }
  .author-dashboard .illustration-upload-form label:nth-of-type(4){
    grid-column:1 / 3;
  }
}
@media(max-width:700px){
  .author-dashboard .illustration-upload-form{
    grid-template-columns:1fr;
  }
  .author-dashboard .illustration-upload-form label:nth-of-type(4){
    grid-column:auto;
  }
  .author-dashboard .illustration-manager-head{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* Polished illustration uploader */
.author-dashboard .illustration-upload-form{
  grid-template-columns:minmax(260px,1.35fr) 105px minmax(260px,1.45fr) minmax(230px,1.25fr) auto;
}
.author-dashboard .illustration-file-field{
  gap:7px;
}
.author-dashboard .illustration-file-input{
  width:100%;
  height:44px;
  min-height:44px;
  padding:5px 6px;
  border:1px solid #d9d0c6;
  border-radius:9px;
  background:#fff;
  color:#6f675f;
  font-size:13px;
  line-height:30px;
  cursor:pointer;
  overflow:hidden;
}
.author-dashboard .illustration-file-input::file-selector-button{
  height:32px;
  margin:0 10px 0 0;
  padding:0 14px;
  border:0;
  border-radius:7px;
  background:#f1ebe5;
  color:#6f3d2d;
  font:700 12px/32px inherit;
  cursor:pointer;
}
.author-dashboard .illustration-file-input:hover::file-selector-button{
  background:#e7ddd4;
}
.author-dashboard .illustration-file-field small{
  margin-top:-2px;
  color:#8b837a;
  font-size:11px;
  font-weight:400;
}
.author-dashboard .illustration-upload-form input[type="number"],
.author-dashboard .illustration-upload-form input[type="text"],
.author-dashboard .illustration-upload-form select{
  height:44px;
  border:1px solid #d9d0c6;
  border-radius:9px;
  background:#fff;
  padding:0 12px;
  font-size:13px;
}
.author-dashboard .illustration-upload-form .btn{
  height:44px;
  min-height:44px;
  padding:0 18px;
  border-radius:9px;
}
@media(max-width:1100px){
  .author-dashboard .illustration-upload-form{
    grid-template-columns:minmax(240px,1fr) 105px minmax(250px,1fr);
  }
}

/* Fix alignment of Chapter Illustration upload fields */
.author-dashboard .illustration-upload-form {
    align-items: start !important;
}

.author-dashboard .illustration-upload-form > label {
    display: grid !important;
    grid-template-rows: 22px 44px auto !important;
    gap: 7px !important;
    align-self: start !important;
}

.author-dashboard .illustration-upload-form .illustration-file-input,
.author-dashboard .illustration-upload-form input[type="number"],
.author-dashboard .illustration-upload-form input[type="text"],
.author-dashboard .illustration-upload-form select {
    height: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
}

.author-dashboard .illustration-upload-form .btn {
    height: 44px !important;
    min-height: 44px !important;
    margin-top: 29px !important;
    align-self: start !important;
}

/* Reader chapter illustrations */
.reader-chapter-illustration {
    width: 100%;
    margin: 28px 0 34px;
    overflow: hidden;
    border-radius: 10px;
}

.reader-chapter-illustration img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.reader-chapter-content,
.reader-chapter-card,
.reader-page {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* =========================================================
   READER — CHAPTER ILLUSTRATION FINAL SPACING
   ========================================================= */

.reader-story .story-illustration {
    width: auto !important;

    /* kapantay ng reading/text area */
    margin: 28px 0 34px !important;

    overflow: hidden;
    border-radius: 10px;
}

.reader-story .story-illustration img {
    display: block;

    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;

    margin: 0 !important;

    object-fit: contain;
    border-radius: 10px;

    box-shadow: 0 8px 28px rgba(36, 25, 18, 0.12);
}

/* =========================
   REGISTRATION — NAME FIELDS
========================= */
.auth-card-register { max-width: 680px; }
.name-fields-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
.field-optional { color:#8b857c; font-size:11px; font-weight:400; }

@media (max-width:600px) {
    .auth-card-register { padding:30px 22px; }
    .name-fields-grid { grid-template-columns:1fr; gap:0; }
}

/* =========================================================
   MOBILE READING EXPERIENCE
   ========================================================= */

@media (max-width: 700px) {

    /* Main reader area */
    .reader-page {
        width: 100%;
        margin: 0;
        padding: 22px 0 48px;
        overflow-x: hidden;
    }

    /* Novel title + chapter counter */
    .reader-topbar {
        width: 100%;
        padding: 0 18px;
        margin-bottom: 18px;
        gap: 12px;

        align-items: center;

        font-size: 12px;
        line-height: 1.4;
    }

    .reader-topbar a {
        min-width: 0;
        max-width: 70%;

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .reader-topbar span {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Remove desktop card appearance */
    .reader-story {
        width: 100%;
        margin: 0;

        padding: 28px 18px 34px;

        border: 0;
        border-radius: 0;
        box-shadow: none;

        background: #fff;
    }

    /* Chapter label */
    .reader-story .reader-preview-kicker {
        font-size: 11px;
        letter-spacing: 0.14em;
    }

    /* Chapter title */
    .reader-story h1 {
        margin: 8px 0 28px;

        padding: 0 5px;

        font-size: 28px;
        line-height: 1.2;
    }

    /* Actual novel text */
    .reader-story-body {
        font-size: 17px;
        line-height: 1.85;
    }

    .reader-story-body p {
        margin: 0 0 1.35em;
    }

    /* Chapter illustrations */
    .reader-story .story-illustration {
        width: auto !important;

        margin-top: 26px !important;
        margin-right: -18px !important;
        margin-bottom: 30px !important;
        margin-left: -18px !important;

        border-radius: 0;
    }

    .reader-story .story-illustration img {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;

        border-radius: 0;
        box-shadow: none;
    }

    /* Previous / Next chapter */
    .reader-chapter-nav {
        width: 100%;
        padding: 0 18px;
        margin-top: 22px;

        gap: 10px;
    }

    .reader-chapter-nav .btn {
        flex: 1;
        min-width: 0;

        padding-left: 10px;
        padding-right: 10px;

        font-size: 12px;
        text-align: center;
    }
}


/* =========================================================
   MOBILE HEADER
   ========================================================= */

@media (max-width: 700px) {

    .site-header .container {
        width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }

    .site-header .nav-container {
        min-height: 60px;

        padding-top: 8px;
        padding-bottom: 8px;

        flex-wrap: nowrap;
        gap: 10px;
    }

    .site-header .brand {
        flex-shrink: 0;
        gap: 8px;
    }

    .site-header .brand-mark {
        width: 34px;
        height: 34px;

        border-radius: 9px;

        font-size: 20px;
    }

    .site-header .brand-text strong {
        font-size: 17px;
    }

    .site-header .brand-text small {
        display: none;
    }

    /* Hide desktop navigation on small screens */
    .site-header .main-nav {
        display: none;
    }

    .site-header .nav-actions {
        margin-left: auto;
        min-width: 0;
    }

    .site-header .user-nav {
        gap: 8px;
        min-width: 0;
    }

    .site-header .user-nav-name {
        max-width: 110px;

        font-size: 11px;

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-header .user-nav .btn {
        min-height: 36px;

        padding: 0 11px;

        font-size: 11px;

        white-space: nowrap;
    }
}


/* Extra-small phones */
@media (max-width: 390px) {

    .reader-story {
        padding-left: 16px;
        padding-right: 16px;
    }

    .reader-story-body {
        font-size: 16.5px;
    }

    .reader-story .story-illustration {
        margin-left: -16px !important;
        margin-right: -16px !important;
    }

    .site-header .user-nav-name {
        display: none;
    }
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.mobile-menu-toggle,
.mobile-menu {
    display: none;
}

@media (max-width: 700px) {

    .site-header .nav-container {
        position: relative;
    }

    .mobile-menu-toggle {
        width: 38px;
        height: 38px;

        padding: 8px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;

        flex: 0 0 38px;

        border: 1px solid #ddd5cc;
        border-radius: 8px;

        background: #fff;

        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;

        display: block;

        border-radius: 2px;

        background: #51483f;

        transition:
            transform .2s ease,
            opacity .2s ease;
    }

    /* Hamburger -> X */
    .mobile-menu-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-menu {
        position: absolute;

        top: calc(100% + 1px);
        left: 0;
        right: 0;

        z-index: 1100;

        padding: 8px 14px 14px;

        background: #fff;

        border-top: 1px solid #eee8e1;
        border-bottom: 1px solid #ddd5cc;

        box-shadow: 0 12px 24px rgba(36, 28, 22, 0.10);
    }

    .mobile-menu.is-open {
        display: block;
    }

    .mobile-menu a {
        min-height: 46px;

        display: flex;
        align-items: center;

        padding: 0 12px;

        border-bottom: 1px solid #eee9e3;

        color: #514b44;

        font-size: 14px;
        font-weight: 600;
    }

    .mobile-menu a:last-child {
        border-bottom: 0;
    }

    .mobile-menu a:hover {
        color: #6d3d2e;
        background: #faf8f5;
    }
}

/* =========================================================
   MOBILE READER — FINAL SPACING POLISH
   ========================================================= */

@media (max-width: 700px) {

    /* Space after novel/chapter top bar */
    .reader-topbar {
        margin-bottom: 0;
    }

    /* Chapter heading area */
    .reader-story {
        padding-top: 24px;
    }

    .reader-story .reader-preview-kicker {
        margin-bottom: 6px;
    }

    .reader-story h1 {
        margin-top: 4px;
        margin-bottom: 24px;
    }

    /* Keep story paragraphs comfortable */
    .reader-story-body p {
        margin-bottom: 1.25em;
    }
}

/* =========================================================
   NOVEL — LIBRARY ACTIONS
   ========================================================= */

.novel-public-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.library-save-form {
    margin: 0;
}

.library-save-form button {
    cursor: pointer;
}

@media (max-width: 520px) {

    .novel-public-actions {
        width: 100%;
    }

    .novel-public-actions > a,
    .library-save-form {
        flex: 1;
    }

    .library-save-form .btn,
    .novel-public-actions > .btn {
        width: 100%;
    }
}

/* =========================================================
   MY LIBRARY — SAVED STORIES
   ========================================================= */

.saved-library-section {
    margin-top: 0;
    padding-top: 24px;
}

.saved-library-section + .library-section {
    margin-top: 40px;
}

.saved-story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.saved-story-card {
    display: flex;
    gap: 20px;

    padding: 20px;

    background: #fff;
    border: 1px solid #e4ded5;
    border-radius: 14px;
}

.saved-story-cover {
    width: 100px;
    min-width: 100px;
    height: 140px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #754332;
    color: #fff;

    font-family: Georgia, serif;
    font-size: 42px;
}

.saved-story-info {
    min-width: 0;
}

.saved-story-label {
    color: #8a5846;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.saved-story-info h3 {
    margin: 6px 0 4px;

    font-family: Georgia, serif;
    font-size: 23px;
}

.saved-story-info h3 a {
    color: inherit;
}

.saved-story-author {
    margin: 0 0 10px;

    color: #754332;

    font-size: 13px;
    font-weight: 700;
}

.saved-story-synopsis {
    display: -webkit-box;
    overflow: hidden;

    margin: 0 0 15px;

    color: #756f66;

    font-size: 13px;
    line-height: 1.55;

    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.saved-story-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.saved-story-actions .btn {
    min-height: 36px;
    padding: 0 13px;

    font-size: 12px;
}

.saved-library-empty {
    padding: 30px;

    border: 1px dashed #cec7bc;
    border-radius: 14px;

    background: #fbfaf7;

    text-align: center;
}

.saved-library-empty p {
    margin: 0 0 15px;

    color: #777168;
}


/* Mobile */
@media (max-width: 700px) {

    .saved-story-grid {
        grid-template-columns: 1fr;
    }

    .saved-story-card {
        gap: 15px;
        padding: 16px;
    }

    .saved-story-cover {
        width: 75px;
        min-width: 75px;
        height: 105px;

        font-size: 32px;
    }

    .saved-story-info h3 {
        font-size: 20px;
    }

    .saved-story-synopsis {
        display: none;
    }

    .saved-story-actions {
        margin-top: 12px;
    }
}

/* =========================================================
   READER — CHAPTER BOOKMARK
   ========================================================= */

.reader-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.chapter-bookmark-form {
    margin: 0;
}

.chapter-bookmark-btn {
    min-height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 0 11px;

    border: 1px solid #d8cec4;
    border-radius: 8px;

    background: #fff;
    color: #6d3d2e;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.chapter-bookmark-btn:hover {
    background: #f7f2ed;
}

.chapter-bookmark-btn.is-bookmarked {
    background: #f4ece7;
    border-color: #c9b5a8;
}


/* Mobile */
@media (max-width: 700px) {

    .reader-topbar {
        align-items: center;
    }

    .reader-topbar-actions {
        gap: 8px;
    }

    .reader-topbar-actions > span {
        font-size: 11px;
    }

    .chapter-bookmark-btn {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;

        padding: 0;

        font-size: 0;
    }

    .chapter-bookmark-btn span {
        font-size: 15px;
    }
}

/* =========================================================
   MY LIBRARY — SECTIONS
   ========================================================= */

.continue-library-section,
.bookmark-library-section {
    margin-top: 40px;
}

.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.bookmark-card {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 18px;

    background: #fff;

    border: 1px solid #e4ded5;
    border-radius: 12px;

    color: inherit;
}

.bookmark-card:hover {
    border-color: #cdbdb2;
    transform: translateY(-1px);
}

.bookmark-card-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #f5ede8;

    font-size: 18px;
}

.bookmark-card-content {
    min-width: 0;
}

.bookmark-card-content span {
    display: block;

    margin-bottom: 3px;

    color: #8a5846;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .08em;
    text-transform: uppercase;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-card-content h3 {
    margin: 0 0 3px;

    font-family: Georgia, serif;
    font-size: 18px;
}

.bookmark-card-content p {
    margin: 0;

    color: #756f66;

    font-size: 13px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-library-empty {
    padding: 24px;

    background: #fbfaf7;

    border: 1px dashed #cec7bc;
    border-radius: 12px;

    color: #777168;
}

.bookmark-library-empty p {
    margin: 0;
}


@media (max-width: 900px) {

    .bookmark-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 600px) {

    .continue-library-section,
    .bookmark-library-section {
        margin-top: 32px;
    }

    .bookmark-grid {
        grid-template-columns: 1fr;
    }

    .bookmark-card {
        padding: 15px;
    }
}