* { box-sizing: border-box; }

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --text: #17202a;
    --muted: #667085;
    --line: #e6e8ee;
    --primary: #155eef;
    --primary-dark: #0d47c7;
    --primary-soft: #edf4ff;
    --success: #157347;
    --danger: #a40000;
    --shadow: 0 12px 34px rgba(16, 24, 40, .07);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #eef4ff 0, transparent 32%), var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 850; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 900; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-link { color: #475467; font-weight: 650; font-size: .94rem; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.admin-link { color: var(--danger); }
.main-content { min-height: calc(100vh - 150px); }
.hero { padding: 92px 0 82px; max-width: 850px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2.35rem, 5vw, 4.55rem); line-height: 1.01; letter-spacing: -.055em; max-width: 800px; }
.hero p { max-width: 690px; color: var(--muted); font-size: 1.1rem; line-height: 1.75; }
.hero-panel { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); }
.hero-panel .mini-title { font-weight: 800; margin-bottom: 16px; }
.mini-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); color: #475467; font-size: .93rem; }
.mini-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 900; flex: 0 0 auto; }
.actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; padding: 12px 18px; font: inherit; font-weight: 750; cursor: pointer; box-shadow: 0 5px 14px rgba(21,94,239,.16); }
.button:hover { text-decoration: none; background: var(--primary-dark); }
.button.secondary { background: #edf0f5; color: var(--text); box-shadow: none; }
.button.secondary:hover { background: #e2e6ed; }
.button.button-small { padding: 9px 14px; font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.narrow { width: min(540px, 100%); margin: 58px auto; }
form { display: grid; gap: 10px; }
label { margin-top: 8px; font-weight: 700; color: #344054; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid #cfd4dc; border-radius: 10px; background: #fff; font: inherit; color: var(--text); }
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(21,94,239,.14); border-color: var(--primary); }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-weight: 500; line-height: 1.5; }
.check-row input { width: auto; margin-top: 4px; }
.alert { border-radius: 10px; padding: 13px 15px; margin: 16px 0; border: 1px solid transparent; }
.alert.error { background: #fff1f1; color: var(--danger); border-color: #ffd5d5; }
.alert.success { background: #ecfdf3; color: var(--success); border-color: #b7ebcd; }
.form-footer { margin-bottom: 0; text-align: center; color: var(--muted); }
.page-head { padding: 48px 0 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
.page-head p { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card h2 { margin: 0 0 10px; letter-spacing: -.02em; }
.card p { line-height: 1.65; }
.meta { color: var(--muted); font-size: .9rem; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #fff7e6; color: #9a6700; font-size: .76rem; font-weight: 800; }
.checklist { padding-left: 20px; line-height: 2; color: #475467; }
.empty-state { text-align: center; padding: 44px 24px; background: var(--surface-soft); border: 1px dashed #cfd4dc; border-radius: 16px; }
.inline-form { display: inline; }
.link-button { border: 0; background: none; padding: 0; color: #475467; font: inherit; font-weight: 650; cursor: pointer; }
.link-button:hover { color: var(--text); }
.site-footer { margin-top: 80px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner div { display: flex; gap: 12px; flex-wrap: wrap; }
.feature-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; padding-bottom: 70px; }
.feature { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.65); }
.feature-icon { font-size: 1.35rem; margin-bottom: 12px; }
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.6; }
.actions-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }

@media (max-width: 800px) {
    .hero-grid, .grid.three, .feature-list { grid-template-columns: 1fr; }
    .hero { padding: 64px 0 58px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .nav { min-height: auto; padding: 14px 0; align-items: flex-start; }
    .nav-links { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
}
@media (max-width: 560px) {
    .container { width: min(100% - 24px, 1120px); }
    .hero h1 { font-size: 2.45rem; }
    .footer-inner { flex-direction: column; }
}

.eyebrow{display:inline-block;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#155eef;margin-bottom:8px}.hero{padding:42px;margin-bottom:28px}.hero h1{font-size:clamp(2rem,4vw,3.2rem);line-height:1.05;max-width:760px;margin:0 0 14px}.section-head,.page-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:26px 0 18px}.badge{display:inline-block;border-radius:999px;padding:5px 10px;background:#eef4ff;color:#155eef;font-size:.78rem;font-weight:700}.empty-state{text-align:center;padding:48px 24px}.admin-card{border-color:#d9b6b6}

.reader-shell { margin: 28px 0 60px; }
.reader-toolbar { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:18px; flex-wrap:wrap; }
.reader-toolbar h1 { margin:6px 0 0; }
.reader-actions { display:flex; gap:10px; flex-wrap:wrap; }
.reader-status { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px 15px; color:#667085; margin-bottom:14px; }
.reader-page-wrap { display:flex; justify-content:center; align-items:flex-start; background:#e5e7eb; border:1px solid #d0d5dd; border-radius:14px; padding:18px; overflow:auto; }
.reader-canvas-stage { position:relative; display:block; width:min(850px,100%); max-width:100%; background:#fff; box-shadow:0 2px 10px rgba(16,24,40,.12); user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; overflow:hidden; margin:0 auto; line-height:0; }
.reader-page { display:block; max-width:100%; height:auto; width:auto; background:#fff; user-select:none; -webkit-user-select:none; pointer-events:none; margin:0 auto; }
.reader-watermark { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; transform:rotate(-28deg); font-size:18px; font-weight:700; letter-spacing:.04em; color:rgba(30,64,175,.14); text-align:center; pointer-events:none; user-select:none; -webkit-user-select:none; white-space:nowrap; }
@media print { .reader-shell { display:none !important; } body::after { content:"Este manuscrito é protegido e não está disponível para impressão."; display:block; margin:25vh auto; max-width:70%; text-align:center; font:700 18px/1.5 sans-serif; } }
.reader-agreement { margin-top:55px; }
@media (max-width:700px){ .reader-toolbar { align-items:flex-start; } .reader-actions { width:100%; } .reader-actions .button { flex:1; text-align:center; } .reader-page-wrap { padding:8px; } }

/* Administração */
.button.danger { background: #a40000; color: #fff; box-shadow: none; }
.button.danger:hover { background: #820000; }
.admin-stats .card h2 { font-size: 2.1rem; margin: 8px 0 14px; }
.admin-menu { margin-top: 20px; }
.actions-card { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; flex-wrap:wrap; }
.admin-inline-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.status-active { background:#ecfdf3; color:#157347; }
.status-inactive { background:#fff1f1; color:#a40000; }
.temporary-password { margin-bottom: 20px; border-color:#b7ebcd; background:#f6fff9; }
.temporary-password code { display:block; margin:12px 0; padding:14px; border-radius:10px; background:#101828; color:#fff; font:700 1.1rem ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.06em; }
.admin-create-book { margin-bottom: 20px; }

/* V7 — cartões de obras, categorias e sinopse */
.form-hint { margin: -4px 0 8px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.books-grid { align-items: start; }
.book-card { min-width: 0; overflow: hidden; }
.book-card-top { display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; }
.book-card-title { margin: 16px 0 12px !important; line-height: 1.15; overflow-wrap:anywhere; word-break:break-word; }
.book-categories { display:flex; flex-wrap:wrap; gap:7px; min-width:0; margin: 0 0 18px; }
.category-chip { display:inline-flex; align-items:center; max-width:100%; padding:5px 10px; border-radius:999px; background:#eef4ff; color:#155eef; font-size:.78rem; font-weight:750; line-height:1.25; overflow-wrap:anywhere; }
.category-empty { color:var(--muted); font-size:.86rem; }
.book-synopsis { min-width:0; margin-bottom:18px; }
.book-synopsis-label { display:block; margin-bottom:6px; color:#344054; font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.book-synopsis p { margin:0; color:var(--muted); line-height:1.65; overflow-wrap:anywhere; word-break:break-word; }
.read-more { margin-top:7px; color:var(--primary); }
.modal[hidden] { display:none; }
.modal { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; }
.modal-backdrop { position:absolute; inset:0; background:rgba(16,24,40,.55); backdrop-filter:blur(3px); }
.modal-dialog { position:relative; z-index:1; width:min(720px,100%); max-height:min(80vh,760px); overflow:auto; padding:30px; border:1px solid var(--line); border-radius:20px; background:#fff; box-shadow:0 24px 70px rgba(16,24,40,.22); }
.modal-dialog h2 { margin:0 0 18px; overflow-wrap:anywhere; word-break:break-word; }
.modal-body { color:#344054; line-height:1.8; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.modal-close { position:absolute; top:12px; right:14px; width:38px; height:38px; border:0; border-radius:10px; background:#f2f4f7; color:#344054; font-size:1.6rem; line-height:1; cursor:pointer; }
.modal-close:hover { background:#e4e7ec; }
body.modal-open { overflow:hidden; }
@media (max-width:700px) {
    .book-card { padding:22px; }
    .modal-dialog { padding:24px 20px; max-height:88vh; }
}

/* V8 — cartões de obras: texto contido e modal de sinopse redesenhado */
.my-books-actions { display:flex; justify-content:flex-end; margin:0 0 20px; }
.books-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.book-card { min-width:0; width:100%; overflow:hidden; }
.book-card-top { min-width:0; display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.book-card-top .status, .book-card-top .meta { max-width:100%; }
.book-card-title { margin:16px 0 14px !important; max-width:100%; line-height:1.12; overflow-wrap:anywhere; word-break:break-word; hyphens:auto; }
.book-categories { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px; width:100%; max-width:100%; margin:0 0 20px; min-width:0; }
.category-chip { display:inline-flex; align-items:center; justify-content:flex-start; max-width:min(100%,280px); min-width:0; padding:6px 11px; border-radius:999px; background:#eef4ff; color:#155eef; font-size:.78rem; font-weight:750; line-height:1.3; overflow-wrap:anywhere; word-break:break-word; white-space:normal; }
.category-empty { color:var(--muted); font-size:.86rem; }
.book-synopsis { width:100%; max-width:100%; min-width:0; margin:0 0 20px; }
.book-synopsis-label { display:block; margin:0 0 7px; color:#344054; font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.book-synopsis-preview { width:100%; max-width:100%; margin:0 !important; color:var(--muted); line-height:1.65; overflow-wrap:anywhere; word-break:break-word; white-space:normal; }
.read-more-button { display:inline-flex; margin-top:9px; padding:0; border:0; background:none; color:var(--primary); font:inherit; font-weight:750; cursor:pointer; }
.read-more-button:hover { text-decoration:underline; }

.synopsis-modal[hidden] { display:none !important; }
.synopsis-modal { position:fixed !important; inset:0 !important; z-index:99999 !important; width:100vw !important; height:100vh !important; margin:0 !important; padding:24px !important; display:flex !important; align-items:center !important; justify-content:center !important; overflow:auto !important; }
.synopsis-modal-backdrop { position:absolute !important; inset:0 !important; width:100% !important; height:100% !important; background:rgba(15,23,42,.62) !important; backdrop-filter:blur(5px); }
.synopsis-modal-panel { position:relative !important; z-index:1 !important; width:min(760px,calc(100vw - 48px)) !important; max-height:min(78vh,720px) !important; overflow:auto !important; margin:0 !important; padding:34px 38px 38px !important; border:1px solid rgba(255,255,255,.65) !important; border-radius:24px !important; background:#fff !important; box-shadow:0 30px 90px rgba(15,23,42,.30) !important; }
.synopsis-modal-eyebrow { margin-bottom:12px !important; }
.synopsis-modal-panel h2 { margin:0 44px 20px 0 !important; font-size:clamp(1.65rem,3vw,2.2rem) !important; line-height:1.15 !important; overflow-wrap:anywhere; word-break:break-word; }
.synopsis-modal-content { color:#344054; font-size:1rem; line-height:1.85; overflow-wrap:anywhere; word-break:break-word; white-space:normal; }
.synopsis-modal-close { position:absolute !important; top:18px !important; right:18px !important; width:40px !important; height:40px !important; display:grid !important; place-items:center !important; border:1px solid #e4e7ec !important; border-radius:12px !important; background:#f8fafc !important; color:#344054 !important; font:500 1.45rem/1 system-ui,sans-serif !important; cursor:pointer !important; }
.synopsis-modal-close:hover { background:#eef2f6 !important; }
.synopsis-modal-close:focus-visible { outline:3px solid rgba(21,94,239,.2); border-color:var(--primary); }
body.synopsis-modal-open { overflow:hidden !important; }

@media (max-width:800px) {
    .books-grid { grid-template-columns:1fr; }
}
@media (max-width:560px) {
    .my-books-actions { justify-content:stretch; }
    .my-books-actions .button { width:100%; }
    .synopsis-modal { padding:12px !important; }
    .synopsis-modal-panel { width:100% !important; max-height:90vh !important; padding:28px 22px 26px !important; border-radius:20px !important; }
    .synopsis-modal-close { top:12px !important; right:12px !important; }
}

/* V10 — denúncias e gerenciamento de administradores do site */
body.modal-open { overflow: hidden; }
.report-trigger { border: 1px solid rgba(220, 38, 38, .18); }
.report-modal[hidden] { display: none !important; }
.report-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; }
.report-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .58); backdrop-filter: blur(5px); }
.report-dialog { position: relative; z-index: 1; width: min(560px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; padding: 32px; border-radius: 22px; background: #fff; box-shadow: 0 24px 80px rgba(15, 23, 42, .25); }
.report-close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f1f5f9; color: #334155; font-size: 25px; line-height: 1; cursor: pointer; }
.report-close:hover { background: #e2e8f0; }
.report-dialog h2 { margin: 10px 42px 8px 0; }
.report-form { display: grid; gap: 16px; margin-top: 22px; }
.report-form label, .admin-role-form label { display: grid; gap: 7px; font-weight: 700; }
.report-form select, .report-form textarea, .admin-role-form select { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 12px; padding: 12px 14px; font: inherit; background: #fff; }
.report-form textarea { resize: vertical; min-height: 130px; }
.admin-role-form { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e2e8f0; }
@media (max-width: 700px) { .report-dialog { padding: 24px 20px; } }

/* Status das denúncias */
.report-status { display:inline-flex; align-items:center; padding:4px 9px; border-radius:999px; font-size:.78rem; font-weight:800; line-height:1.2; }
.report-status-open { background:#fff4e5; color:#b54708; }
.report-status-reviewing { background:#eef4ff; color:#155eef; }
.report-status-resolved { background:#ecfdf3; color:#157347; }
.report-status-dismissed { background:#f2f4f7; color:#475467; }


/* UI FIX — cartões: impedir qualquer conteúdo de criar rolagem horizontal */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.card,
.grid,
.grid > *,
.book-card,
.book-card > *,
.book-card-top,
.book-synopsis,
.book-synopsis-preview {
    min-width: 0;
    max-width: 100%;
}

.card {
    overflow: hidden;
}

.card p,
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card span,
.card a,
.card div,
.book-card-title,
.book-synopsis-preview {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* UI FIX — cabeçalho/menu: aparência mais limpa e estável */
.site-header {
    background: rgba(255,255,255,.96);
    box-shadow: 0 4px 18px rgba(16,24,40,.06);
}

.nav {
    min-width: 0;
}

.brand {
    flex: 0 0 auto;
}

.nav-links {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 800px) {
    .site-header {
        position: sticky;
        top: 0;
    }

    .nav {
        width: min(100% - 20px, 1120px);
        min-height: 58px;
        padding: 9px 0;
        gap: 8px;
        align-items: center;
    }

    .brand {
        font-size: .9rem;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .nav-links {
        flex: 1 1 auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 2px 5px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link,
    .link-button {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: .82rem;
        padding: 6px 8px;
        border-radius: 8px;
    }

    .nav-link:hover {
        background: #f2f4f7;
    }

    .nav-link.admin-link {
        background: #fff5f5;
    }

    .inline-form {
        flex: 0 0 auto;
    }
}

@media (max-width: 560px) {
    .nav {
        width: calc(100% - 16px);
    }

    .brand > span:last-child {
        display: none;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
    }

    .nav-links {
        gap: 5px;
    }

    .nav-link,
    .link-button {
        font-size: .78rem;
        padding: 6px 7px;
    }
}


/* CORREÇÃO — cards: nenhum conteúdo pode ultrapassar o próprio card */
.card,
.card > *,
.card p,
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card span,
.card a,
.card div,
.card form,
.card .actions,
.card .button {
    min-width: 0;
    max-width: 100%;
}

.card {
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card p,
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card span,
.card a {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.actions {
    min-width: 0;
    max-width: 100%;
}

.actions > form {
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
}

.actions .button {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
}

/* CORREÇÃO — menu mobile: duas linhas limpas, sem menu espremido ou "flutuando" */
@media (max-width: 800px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .nav {
        width: min(100% - 20px, 1120px);
        min-height: 0;
        padding: 10px 0 12px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 9px;
    }

    .brand {
        align-self: flex-start;
    }

    .nav-links {
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
        overflow: visible;
        padding: 0;
    }

    .nav-link,
    .link-button {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: .82rem;
        padding: 7px 9px;
        border-radius: 9px;
    }

    .nav-link:hover {
        background: #f2f4f7;
    }

    .nav-link.admin-link {
        background: #fff5f5;
    }

    .inline-form {
        flex: 0 0 auto;
    }
}

@media (max-width: 560px) {
    .nav {
        width: calc(100% - 16px);
        padding-top: 8px;
        padding-bottom: 9px;
    }

    .brand {
        font-size: .9rem;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .nav-links {
        gap: 5px;
    }

    .nav-link,
    .link-button {
        font-size: .78rem;
        padding: 6px 7px;
    }
}


/* CORREÇÃO DEFINITIVA — cards em telas pequenas */
@media (max-width: 800px) {
    .grid,
    .grid.three,
    .books-grid {
        grid-template-columns: 1fr !important;
    }

    .card {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .card form {
        min-width: 0;
        max-width: 100%;
    }

    .card .button {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .book-delete-form .button {
        width: 100%;
    }
}

/* MENU MOBILE — compacto, com botão próprio em vez de menu espremido */
.nav-top {
    display: contents;
}

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

@media (max-width: 800px) {
    .nav {
        display: block;
        padding: 10px 0;
    }

    .nav-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 40px;
    }

    .brand {
        min-width: 0;
    }

    .mobile-menu-toggle {
        display: flex;
        width: 42px;
        height: 38px;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
        color: var(--text);
        cursor: pointer;
        box-shadow: 0 3px 10px rgba(16,24,40,.06);
    }

    .mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: #344054;
        transition: transform .18s ease, opacity .18s ease;
    }

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

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

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

    .nav-links {
        display: none;
        width: 100%;
        margin-top: 9px;
        padding: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 12px 30px rgba(16,24,40,.10);
    }

    .nav-links.mobile-menu-open {
        display: flex;
    }

    .nav-link,
    .link-button {
        display: block;
        width: 100%;
        padding: 10px 12px;
        border-radius: 9px;
        text-align: left;
        font-size: .9rem;
        white-space: normal;
    }

    .nav-link:hover,
    .link-button:hover {
        background: #f2f4f7;
    }

    .nav-link.admin-link {
        background: #fff5f5;
    }

    .inline-form {
        width: 100%;
    }
}

@media (min-width: 801px) {
    .nav-top {
        display: contents;
    }
}



/* FINAL RESPONSIVE/UI RULES */
.card,.card>*,.card p,.card h1,.card h2,.card h3,.card h4,.card h5,.card h6,
.card span,.card a,.card div,.card form,.report-details,.book-synopsis,.book-synopsis-preview{
    min-width:0;max-width:100%;box-sizing:border-box;white-space:normal;
    overflow-wrap:anywhere;word-break:break-word;
}
.report-details{display:block;width:100%;overflow:hidden;overflow-wrap:anywhere!important;word-break:break-word!important;white-space:normal!important}
.card .actions{min-width:0;max-width:100%;display:flex;flex-wrap:wrap;gap:8px}
.card .actions>form{min-width:0;max-width:100%;flex:0 1 auto}
.card .actions .button,.card>form .button{max-width:100%;white-space:normal!important;overflow-wrap:anywhere;word-break:break-word;text-align:center}

@media(max-width:800px){
 .grid,.grid.three,.books-grid,.admin-books-grid,.reports-grid{
   grid-template-columns:minmax(0,1fr)!important;width:100%;min-width:0;
 }
 .grid>.card{width:100%;min-width:0}
 .grid>.card .actions{width:100%;flex-direction:column;align-items:stretch}
 .grid>.card .actions>form,.grid>.card .actions .button,.grid>.card>form{width:100%;max-width:100%}

 .site-header .nav,.nav{position:relative;display:flex;align-items:center;min-height:58px;padding:8px 0;width:min(100% - 16px,1120px)}
 .site-header .brand,.nav .brand{min-width:0;max-width:calc(100% - 52px)}
 .mobile-menu-toggle{display:grid!important;place-items:center;position:absolute;right:0;top:8px;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);font:inherit;font-size:22px;line-height:1;cursor:pointer;z-index:100}
 .site-header .nav-links,.nav .nav-links{
   display:none!important;position:absolute;left:0;right:0;top:calc(100% - 1px);width:100%;max-width:100%;margin:0;padding:8px;box-sizing:border-box;
   flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;gap:3px!important;
   border:1px solid var(--line);border-radius:0 0 14px 14px;background:#fff;box-shadow:0 12px 28px rgba(16,24,40,.12);z-index:90
 }
 .site-header .nav-links.mobile-menu-open,.nav .nav-links.mobile-menu-open{display:flex!important}
 .site-header .nav-links .nav-link,.site-header .nav-links .link-button,.site-header .nav-links .inline-form,
 .nav .nav-links .nav-link,.nav .nav-links .link-button,.nav .nav-links .inline-form{
   width:100%;max-width:100%;box-sizing:border-box;flex:0 0 auto
 }
 .site-header .nav-links .nav-link,.site-header .nav-links .link-button,.nav .nav-links .nav-link,.nav .nav-links .link-button{
   display:flex;align-items:center;justify-content:flex-start;min-height:42px;padding:9px 11px;border-radius:8px;white-space:normal!important
 }
}
@media(min-width:801px){.mobile-menu-toggle{display:none!important}}


/* FINAL: hamburger/mobile menu completely disabled */
.mobile-menu-toggle {
    display: none !important;
}

@media (max-width: 800px) {
    .site-header .nav,
    .nav {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        min-height: 58px;
    }

    .site-header .brand,
    .nav .brand {
        max-width: none;
        padding-right: 0;
    }

    .site-header .nav-links,
    .nav .nav-links,
    .site-header .nav-links.mobile-menu-open,
    .nav .nav-links.mobile-menu-open {
        display: flex !important;
        position: static;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
        padding: 0;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .site-header .nav-links .nav-link,
    .site-header .nav-links .link-button,
    .site-header .nav-links .inline-form,
    .nav .nav-links .nav-link,
    .nav .nav-links .link-button,
    .nav .nav-links .inline-form {
        width: auto;
        max-width: 100%;
        flex: 0 1 auto;
    }

    .site-header .nav-links .nav-link,
    .site-header .nav-links .link-button,
    .nav .nav-links .nav-link,
    .nav .nav-links .link-button {
        min-height: 36px;
        padding: 7px 8px;
        white-space: nowrap !important;
    }
}

@media (min-width: 801px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Conteúdo longo: limite visual + botão Mais + janela flutuante */
.expandable-text{min-width:0;max-width:100%}
.expandable-preview{margin:0;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word;white-space:normal}
.read-more-button{display:inline-flex;align-items:center;border:0;background:transparent;color:var(--primary);padding:0;margin-top:8px;font:inherit;font-weight:800;cursor:pointer}
.read-more-button:hover{text-decoration:underline}
.content-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box}
.content-modal[hidden]{display:none!important}
.content-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.62);backdrop-filter:blur(5px)}
.content-modal-panel{position:relative;z-index:1;width:min(900px,100%);max-height:min(78vh,760px);overflow:auto;background:#fff;border:1px solid #e4e7ec;border-radius:24px;padding:38px 46px;box-shadow:0 24px 70px rgba(15,23,42,.25);box-sizing:border-box}
.content-modal-close{position:absolute;top:18px;right:18px;width:40px;height:40px;display:grid;place-items:center;border:1px solid #e4e7ec;border-radius:12px;background:#f8fafc;color:#344054;font:500 1.45rem/1 system-ui;cursor:pointer}
.content-modal-body{margin-top:18px;color:#344054;font-size:1rem;line-height:1.85;overflow-wrap:anywhere;word-break:break-word;white-space:normal}
body.content-modal-open{overflow:hidden}
@media(max-width:600px){
 .content-modal{padding:12px}
 .content-modal-panel{max-height:86vh;padding:32px 22px 26px;border-radius:18px}
 .content-modal-close{top:12px;right:12px}
}

/* FINAL LONG-TEXT FIX v3 */
.expandable-text,
.expandable-preview,
.book-synopsis,
.book-synopsis-preview,
.report-details {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
.expandable-preview,
.book-synopsis-preview {
    white-space: normal !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    max-width: 100% !important;
}
.read-more-button {
    display: inline-flex !important;
    margin-top: 10px !important;
}
.content-modal,
.synopsis-modal {
    max-width: 100vw !important;
    max-height: 100vh !important;
}


/* FINAL HARD FIX: long unbroken previews can NEVER create page overflow. */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
.expandable-text,
.expandable-text .expandable-preview,
.report-details,
.book-admin-synopsis,
.book-synopsis,
.book-synopsis-preview {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
.expandable-text .expandable-preview,
.report-details .expandable-preview {
    margin: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    overflow: hidden !important;
}
.read-more-button {
    display: inline-flex !important;
    align-items: center !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--primary) !important;
    padding: 0 !important;
    margin: 10px 0 0 !important;
    font: inherit !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}
.content-modal[hidden] { display: none !important; }
.content-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}
.content-modal-panel {
    position: relative !important;
    z-index: 1 !important;
    width: min(900px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    max-height: 78vh !important;
    overflow: auto !important;
    box-sizing: border-box !important;
}
.content-modal-body {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}
@media (max-width: 600px) {
    .content-modal { padding: 12px !important; }
    .content-modal-panel {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: 86vh !important;
    }
}

/* FINAL: working "Mais" trigger + report content modal */
.read-more-button {
    display: inline-flex !important;
    align-items: center;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #155eef;
    font: inherit;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}
.read-more-button:hover { text-decoration: underline; }
.read-more-button:focus-visible {
    outline: 3px solid rgba(21,94,239,.22);
    outline-offset: 3px;
    border-radius: 4px;
}
.content-modal[hidden] { display: none !important; }
.content-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}
.content-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15,23,42,.62) !important;
    backdrop-filter: blur(5px);
}
.content-modal-panel {
    position: relative !important;
    z-index: 1 !important;
    width: min(900px, calc(100vw - 48px)) !important;
    max-height: min(78vh, 760px) !important;
    overflow: auto !important;
    box-sizing: border-box !important;
    padding: 38px 46px !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(15,23,42,.25) !important;
}
.content-modal-close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 2 !important;
    width: 40px !important;
    height: 40px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #344054 !important;
    font-size: 1.45rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
}
.content-modal-body {
    margin-top: 18px !important;
    color: #344054 !important;
    font-size: 1rem !important;
    line-height: 1.85 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}
body.content-modal-open { overflow: hidden !important; }

@media (max-width: 700px) {
    .content-modal { padding: 12px !important; }
    .content-modal-panel {
        width: 100% !important;
        max-height: 88vh !important;
        padding: 32px 22px 26px !important;
        border-radius: 18px !important;
    }
    .content-modal-close { top: 12px !important; right: 12px !important; }
}

/* FINAL FIX: hidden content modals must remain hidden until "Mais" is clicked. */
.content-modal[hidden] {
    display: none !important;
}

/* FINAL MODAL PORTAL FIX */
.read-more-button {
    display: inline-flex !important;
    width: auto !important;
    height: auto !important;
    margin-top: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--primary) !important;
    font: inherit !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}
.read-more-button:hover { text-decoration: underline !important; }

.content-modal[hidden] {
    display: none !important;
}
.content-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    isolation: isolate !important;
}
.content-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    background: rgba(15,23,42,.62) !important;
    backdrop-filter: blur(5px) !important;
}
.content-modal-panel {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    width: min(900px, calc(100vw - 48px)) !important;
    max-width: min(900px, calc(100vw - 48px)) !important;
    max-height: min(78vh, 760px) !important;
    margin: 0 !important;
    padding: 38px 46px !important;
    box-sizing: border-box !important;
    overflow: auto !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(15,23,42,.25) !important;
}
.content-modal-panel * {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.content-modal-close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 2 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #344054 !important;
    font: 500 1.45rem/1 system-ui,sans-serif !important;
    cursor: pointer !important;
}
.content-modal-body {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 18px !important;
    color: #344054 !important;
    font-size: 1rem !important;
    line-height: 1.85 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}
body.content-modal-open {
    overflow: hidden !important;
}
@media (max-width:700px) {
    .content-modal { padding: 12px !important; }
    .content-modal-panel {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: 88vh !important;
        padding: 32px 22px 26px !important;
        border-radius: 18px !important;
    }
    .content-modal-close { top: 12px !important; right: 12px !important; }
}

/* ABSOLUTE FINAL: report "Mais" modal is a true viewport portal */
.content-modal[hidden]{display:none!important}
.content-modal{
 position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:0!important;
 width:100vw!important;height:100vh!important;max-width:none!important;min-width:0!important;
 margin:0!important;padding:24px!important;box-sizing:border-box!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 overflow:hidden!important;z-index:2147483647!important;
}
.content-modal-backdrop{
 position:absolute!important;top:0!important;right:0!important;bottom:0!important;left:0!important;
 width:100%!important;height:100%!important;margin:0!important;
 background:rgba(15,23,42,.62)!important;backdrop-filter:blur(5px)!important;z-index:0!important;
}
.content-modal-panel{
 position:relative!important;z-index:2!important;display:block!important;
 width:min(900px,calc(100vw - 48px))!important;
 max-width:min(900px,calc(100vw - 48px))!important;
 max-height:min(78vh,760px)!important;overflow:auto!important;
 margin:0!important;padding:38px 46px!important;box-sizing:border-box!important;
 background:#fff!important;border:1px solid #e4e7ec!important;border-radius:24px!important;
 box-shadow:0 30px 90px rgba(15,23,42,.30)!important;
}
@media(max-width:700px){
 .content-modal{padding:12px!important}
 .content-modal-panel{
  width:calc(100vw - 24px)!important;max-width:calc(100vw - 24px)!important;
  max-height:88vh!important;padding:32px 22px 26px!important;border-radius:18px!important
 }
}

.status-manuscript-sent { background:#ecfdf3; color:#157347; }

/* DREAMCORE HOME — ajuste estrutural responsivo da página inicial */
body {
    background:
        radial-gradient(circle at 8% 35%, rgba(231, 151, 221, .18), transparent 24%),
        radial-gradient(circle at 92% 18%, rgba(122, 178, 255, .16), transparent 26%),
        #f5f3fb;
}

/* A home não pode herdar a largura estreita do layout antigo. */
.main-content > .hero:first-child {
    width: 100%;
    max-width: none;
    margin: 0;
}

.hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(72px, 8vw, 108px) clamp(28px, 6vw, 76px) clamp(74px, 8vw, 104px);
    overflow: hidden;
    border-radius: 0 0 34px 34px;
    color: #f8edff;
    background:
        radial-gradient(circle at 18% 22%, rgba(221, 119, 208, .50), transparent 30%),
        radial-gradient(circle at 82% 22%, rgba(70, 147, 207, .34), transparent 30%),
        radial-gradient(circle at 52% 78%, rgba(105, 55, 172, .28), transparent 35%),
        linear-gradient(145deg, #452344 0%, #17172f 45%, #0c1025 100%);
    box-shadow: 0 24px 60px rgba(42, 25, 65, .18);
}

/* estrelas discretas, sem depender de imagens externas */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}
.hero::before {
    opacity: .8;
    background-image:
        radial-gradient(circle at 8% 18%, rgba(255,255,255,.9) 0 1.5px, transparent 2px),
        radial-gradient(circle at 22% 35%, rgba(255,255,255,.72) 0 1px, transparent 2px),
        radial-gradient(circle at 37% 12%, rgba(255,255,255,.8) 0 1.5px, transparent 2px),
        radial-gradient(circle at 52% 28%, rgba(255,255,255,.72) 0 1px, transparent 2px),
        radial-gradient(circle at 68% 15%, rgba(255,255,255,.9) 0 1.5px, transparent 2px),
        radial-gradient(circle at 81% 40%, rgba(255,255,255,.65) 0 1px, transparent 2px),
        radial-gradient(circle at 94% 24%, rgba(255,255,255,.8) 0 1px, transparent 2px),
        radial-gradient(circle at 15% 70%, rgba(255,255,255,.65) 0 1px, transparent 2px),
        radial-gradient(circle at 42% 84%, rgba(255,255,255,.8) 0 1px, transparent 2px),
        radial-gradient(circle at 72% 72%, rgba(255,255,255,.75) 0 1.5px, transparent 2px),
        radial-gradient(circle at 90% 88%, rgba(255,255,255,.8) 0 1px, transparent 2px);
}
.hero::after {
    background: radial-gradient(ellipse at center, transparent 30%, rgba(5,7,22,.42) 100%);
}

.hero-grid {
    width: min(1120px, 100%);
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
}

.hero-grid > div {
    min-width: 0;
    max-width: 760px;
}

.hero .eyebrow {
    color: #d8c4ff;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.20);
    box-shadow: inset 0 0 18px rgba(255,255,255,.03);
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 22px;
    color: #f8eaff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 6vw, 5.6rem);
    font-weight: 500;
    line-height: .99;
    letter-spacing: -.045em;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: #d2c5e9;
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    line-height: 1.75;
}

.hero .actions {
    margin-top: 34px;
    gap: 14px;
}

.hero .actions .button {
    min-width: 142px;
    padding: 14px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #caa2ff 0%, #f09bcf 100%);
    color: #171226;
    box-shadow: 0 12px 30px rgba(226, 143, 224, .22);
}
.hero .actions .button:hover {
    background: linear-gradient(135deg, #d8b7ff 0%, #f5add9 100%);
    color: #171226;
}
.hero .actions .button.secondary {
    background: rgba(255,255,255,.025);
    color: #e8dfff;
    border: 1px solid rgba(224,205,255,.55);
    box-shadow: none;
}
.hero .actions .button.secondary:hover {
    background: rgba(255,255,255,.09);
    color: #fff;
}

.hero-panel {
    width: 100%;
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(232,210,255,.22);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.035));
    box-shadow: 0 22px 50px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
}
.hero-panel .mini-title { color: #fff; }
.hero-panel .mini-item { color: #ddd2ec; border-top-color: rgba(255,255,255,.12); }
.hero-panel .mini-icon {
    background: rgba(239,164,225,.18);
    color: #f4b8e8;
}

.feature-list {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: 54px 0 70px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.feature {
    min-width: 0;
    padding: 26px;
    border: 1px solid #ece7f4;
    border-radius: 22px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 14px 34px rgba(76, 54, 112, .08);
}
.feature h3 { color: #17172a; }
.feature p { color: #565066; }

/* A home deve continuar agradável em telas estreitas, sem esmagar o título. */
@media (max-width: 900px) {
    .hero {
        padding-left: 28px;
        padding-right: 28px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }
    .hero-grid > div { max-width: 760px; }
    .hero-panel { max-width: 560px; }
    .feature-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .hero {
        padding: 52px 22px 58px;
        border-radius: 0 0 26px 26px;
    }
    .hero-grid { gap: 30px; }
    .hero h1 {
        font-size: clamp(2.75rem, 13vw, 4.1rem);
        line-height: 1.02;
        letter-spacing: -.035em;
    }
    .hero p {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    .hero .actions {
        gap: 10px;
    }
    .hero .actions .button {
        min-width: 0;
        flex: 1 1 145px;
    }
    .hero-panel {
        padding: 20px;
    }
    .feature-list {
        width: calc(100% - 28px);
        padding-top: 28px;
    }
}

/* DREAMCORE THEME — identidade visual aplicada ao site inteiro */
:root {
    --bg: #f7f5ff;
    --surface: #ffffff;
    --surface-soft: #fbf9ff;
    --text: #171427;
    --muted: #565066;
    --line: #e8e1f2;
    --primary: #7654e8;
    --primary-dark: #5f3fc9;
    --primary-soft: #f0eaff;
    --success: #15803d;
    --danger: #b42318;
    --shadow: 0 16px 40px rgba(54, 34, 93, .09);
}

body {
    background:
        radial-gradient(circle at 8% 18%, rgba(238, 196, 255, .24), transparent 27%),
        radial-gradient(circle at 92% 8%, rgba(188, 208, 255, .30), transparent 28%),
        #f7f5ff;
    color: var(--text);
}

a { color: #6a45d8; }
a:hover { color: #4e31ad; }

.site-header {
    background: rgba(255,255,255,.94);
    border-bottom-color: #e9e4f1;
    box-shadow: 0 4px 22px rgba(43, 29, 70, .06);
}
.brand { color: #1b1728; }
.brand-mark {
    background: linear-gradient(135deg, #7654e8 0%, #a76bea 55%, #ef8fce 100%);
    box-shadow: 0 7px 18px rgba(118,84,232,.28);
}
.nav-link { color: #554e67; }
.nav-link:hover { color: #1b1728; }
.admin-link { color: #b42318; }
.link-button { color: #554e67; }
.link-button:hover { color: #1b1728; }

/* Hero da página inicial */
.hero {
    position: relative;
    max-width: none;
    padding: 88px 56px 82px;
    margin: 0;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 24%, rgba(224,117,199,.46), transparent 30%),
        radial-gradient(circle at 86% 20%, rgba(76,143,204,.35), transparent 32%),
        radial-gradient(circle at 50% 92%, rgba(108,64,190,.24), transparent 38%),
        linear-gradient(135deg, #33213f 0%, #18132d 48%, #0d1326 100%);
    color: #fff;
    box-shadow: 0 22px 55px rgba(38,27,68,.18);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .55;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.72) 0 1px, transparent 1.8px),
        radial-gradient(circle, rgba(255,255,255,.46) 0 1px, transparent 1.7px);
    background-size: 180px 180px, 260px 260px;
    background-position: 15px 20px, 90px 80px;
}
.hero-grid {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    margin: 0 auto;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
    gap: 52px;
}
.eyebrow {
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.18);
    color: #f0d8ff;
}
.hero h1 {
    color: #fff7ff;
    max-width: 820px;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: -.045em;
}
.hero p { color: #d8cde7; }
.hero .button:not(.secondary) {
    background: linear-gradient(135deg, #c28cff 0%, #ef91d0 100%);
    color: #171226;
    box-shadow: 0 10px 28px rgba(196,125,226,.28);
}
.hero .button:not(.secondary):hover {
    background: linear-gradient(135deg, #d09cff 0%, #f3a0d8 100%);
}
.hero .button.secondary {
    background: transparent;
    color: #e9dfff;
    border: 1px solid rgba(221,204,255,.45);
}
.hero .button.secondary:hover { background: rgba(255,255,255,.08); }
.hero-panel {
    align-self: center;
    background: rgba(255,255,255,.09);
    border-color: rgba(255,255,255,.16);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 55px rgba(0,0,0,.18);
    color: #fff;
}
.hero-panel .mini-title { color: #fff; }
.mini-item { color: #ddd2ea; border-top-color: rgba(255,255,255,.12); }
.mini-icon { background: rgba(216,151,232,.18); color: #f0b5e8; }

/* Botões e elementos de ação em todo o site */
.button {
    background: linear-gradient(135deg, #6f4ee4 0%, #a864e5 60%, #e78bcf 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(103,70,211,.20);
}
.button:hover { background: linear-gradient(135deg, #6040cf 0%, #9451d6 60%, #dc78c4 100%); }
.button.secondary {
    background: #f0ecf8;
    color: #2c263a;
    border: 1px solid #e3dced;
}
.button.secondary:hover { background: #e7e0f2; }
.button.danger { background: #b42318; color: #fff; box-shadow: 0 6px 16px rgba(180,35,24,.16); }
.button.danger:hover { background: #991b1b; }

.card, .feature {
    background: rgba(255,255,255,.96);
    border-color: #e8e1f2;
    box-shadow: var(--shadow);
}
.feature { transition: transform .18s ease, box-shadow .18s ease; }
.feature:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(54,34,93,.12); }
.feature-icon { filter: saturate(.9); }

.badge, .category-chip {
    background: #f0eaff;
    color: #6642d4;
}
.status { background: #fff7e6; color: #9a6700; }
.status.status-manuscript-sent, .status-active {
    background: #ecfdf3 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}

input, textarea, select {
    border-color: #d9d1e5;
    background: #fff;
}
input:focus, textarea:focus, select:focus {
    outline-color: rgba(118,84,232,.16);
    border-color: #7654e8;
}

.alert.success { background: #ecfdf3; border-color: #b7ebcd; color: #157347; }
.alert.error { background: #fff1f1; border-color: #ffd5d5; color: #b42318; }

.page-head h1, .card h2, .book-card-title { color: #171427; }
.book-synopsis-label { color: #312a40; }
.read-more, .read-more-button { color: #6a45d8; }

.site-footer {
    border-top-color: #e8e1f2;
    color: #565066;
}

.admin-card { border-color: #ead7df; }
.temporary-password { border-color: #b7ebcd; }

/* Leitor: mantém a área do manuscrito funcional, mas com a nova identidade */
.reader-page-wrap {
    background: #eeeaf6;
    border-color: #ddd5e8;
}
.reader-status { border-color: #e5ddec; background: #fff; color: #4f495e; }

/* Modais de conteúdo/sinopse */
.synopsis-modal-backdrop, .modal-backdrop { background: rgba(20,15,38,.68) !important; }
.synopsis-modal-panel, .modal-dialog {
    border-color: #e5dced !important;
    box-shadow: 0 30px 90px rgba(35,22,58,.34) !important;
}
.synopsis-modal-eyebrow { background: #f0eaff; color: #6642d4; }
.synopsis-modal-close, .modal-close { background: #f5f1fa; color: #3b3349; border-color: #e5ddec; }

@media (min-width: 801px) {
    .main-content > .hero {
        width: min(1120px, calc(100% - 36px));
        margin: 0 auto;
    }
    .main-content > .feature-list {
        width: min(1120px, calc(100% - 36px));
        margin: 34px auto 0;
    }
}

@media (max-width: 800px) {
    .hero {
        padding: 64px 28px 58px;
        border-radius: 0 0 24px 24px;
    }
    .hero-grid { gap: 28px; }
    .hero h1 { font-size: clamp(2.35rem, 9vw, 3.5rem); }
}

@media (max-width: 560px) {
    .hero { padding: 52px 22px 50px; }
    .hero h1 { font-size: 2.55rem; }
    .hero p { font-size: 1rem; }
    .actions .button { flex: 1 1 auto; }
}


/* FIX FINAL — Dashboard/hero com classe .card
   O estilo genérico de .card não pode sobrescrever o fundo Dreamcore do hero. */
.hero.card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(64px, 7vw, 92px) clamp(28px, 6vw, 72px) clamp(64px, 7vw, 86px);
    border: 0;
    border-radius: 0 0 30px 30px;
    color: #fff7ff;
    background:
        radial-gradient(circle at 18% 22%, rgba(224,117,199,.48), transparent 30%),
        radial-gradient(circle at 84% 18%, rgba(76,143,204,.36), transparent 32%),
        radial-gradient(circle at 50% 88%, rgba(108,64,190,.25), transparent 38%),
        linear-gradient(135deg, #33213f 0%, #18132d 48%, #0d1326 100%);
    box-shadow: 0 22px 55px rgba(38,27,68,.18);
}

.hero.card::before,
.hero.card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero.card::before {
    z-index: 0;
    opacity: .7;
    background-image:
        radial-gradient(circle at 8% 18%, rgba(255,255,255,.9) 0 1.5px, transparent 2px),
        radial-gradient(circle at 22% 35%, rgba(255,255,255,.7) 0 1px, transparent 2px),
        radial-gradient(circle at 37% 12%, rgba(255,255,255,.8) 0 1.5px, transparent 2px),
        radial-gradient(circle at 52% 28%, rgba(255,255,255,.7) 0 1px, transparent 2px),
        radial-gradient(circle at 68% 15%, rgba(255,255,255,.9) 0 1.5px, transparent 2px),
        radial-gradient(circle at 81% 40%, rgba(255,255,255,.65) 0 1px, transparent 2px),
        radial-gradient(circle at 94% 24%, rgba(255,255,255,.8) 0 1px, transparent 2px),
        radial-gradient(circle at 15% 70%, rgba(255,255,255,.65) 0 1px, transparent 2px),
        radial-gradient(circle at 42% 84%, rgba(255,255,255,.8) 0 1px, transparent 2px),
        radial-gradient(circle at 72% 72%, rgba(255,255,255,.75) 0 1.5px, transparent 2px),
        radial-gradient(circle at 90% 88%, rgba(255,255,255,.8) 0 1px, transparent 2px);
}
.hero.card::after {
    z-index: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(5,7,22,.42) 100%);
}
.hero.card > * {
    position: relative;
    z-index: 1;
}
.hero.card .eyebrow {
    color: #f0d8ff;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.18);
}
.hero.card h1 {
    color: #fff7ff;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 1.02;
    letter-spacing: -.045em;
    max-width: 820px;
}
.hero.card p,
.hero.card p.muted {
    color: #d8cde7 !important;
}
.hero.card .button:not(.secondary) {
    background: linear-gradient(135deg, #c28cff 0%, #ef91d0 100%);
    color: #171226;
    box-shadow: 0 10px 28px rgba(196,125,226,.28);
}
.hero.card .button.secondary {
    background: rgba(255,255,255,.035);
    color: #e9dfff;
    border: 1px solid rgba(221,204,255,.45);
}
.hero.card .button.secondary:hover {
    background: rgba(255,255,255,.09);
    color: #fff;
}

@media (min-width: 801px) {
    .main-content > .hero.card {
        width: min(1120px, calc(100% - 36px));
    }
}
@media (max-width: 800px) {
    .hero.card {
        padding: 58px 28px 60px;
        border-radius: 0 0 24px 24px;
    }
}
@media (max-width: 560px) {
    .hero.card {
        width: 100%;
        padding: 50px 22px 52px;
    }
    .hero.card h1 {
        font-size: clamp(2.45rem, 12vw, 3.7rem);
    }
}


/* CONTRASTE DOS IDENTIFICADORES DE SEÇÃO
   Os pequenos títulos como "ÁREA DO AUTOR", "PRIVACIDADE" e
   "ADMINISTRAÇÃO" precisam permanecer legíveis em todas as páginas. */
.eyebrow {
    color: #5b21b6 !important;
    background: #f0e8ff !important;
    border: 1px solid #ddc8ff !important;
}

/* No hero escuro, o identificador continua claro para manter contraste. */
.hero.card .eyebrow {
    color: #f0d8ff !important;
    background: rgba(255,255,255,.09) !important;
    border: 1px solid rgba(255,255,255,.18) !important;
}

/* Leitor interno — maior nitidez e navegação por gesto somente em dispositivos móveis */
.reader-page-wrap { touch-action: pan-y; }
.reader-canvas-stage { touch-action: pan-y; }
.reader-swipe-hint { display:none; margin-left:8px; font-weight:700; color:#475467; }
.admin-first-upload { margin-top:-4px; margin-bottom:10px; }
@media (max-width:800px) and (pointer:coarse) {
    .reader-swipe-hint { display:block; margin:6px 0 0; }
    .reader-page-wrap { padding:4px; }
    .reader-canvas-stage { width:100%; }
}


/* LOGO — manter a imagem rigorosamente contida no espaço da marca */
.brand-mark.logo-image {
    position: relative !important;
    overflow: hidden !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 10px !important;
}
.brand-mark.logo-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: inherit !important;
}


/* CORREÇÃO FINAL DA LOGO — impede que a imagem ultrapasse o ícone da navegação. */
.site-header .brand .brand-mark.logo-image {
    overflow: hidden !important;
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
}
.site-header .brand .brand-mark.logo-image > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}
@media (max-width: 800px) {
    .site-header .brand .brand-mark.logo-image {
        width: 30px !important;
        height: 30px !important;
        flex-basis: 30px !important;
    }
}
@media (max-width: 560px) {
    .site-header .brand .brand-mark.logo-image {
        width: 30px !important;
        height: 30px !important;
        flex-basis: 30px !important;
    }
}

/* Limite individual de feedbacks por obra */
.admin-feedback-limit-form{display:grid;gap:10px;margin-top:18px;padding-top:18px;border-top:1px solid #e2e8f0}.admin-feedback-limit-form label{display:grid;gap:7px;font-weight:700}.admin-feedback-limit-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.admin-feedback-limit-row input{width:110px;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:12px;padding:12px 14px;font:inherit;background:#fff}.admin-feedback-limit-row .button{margin:0}
