:root {
    --brand-blue: #003f70;
    --brand-blue-dark: #052f58;
    --brand-gold: #c98708;
    --brand-cream: #fffaf3;
    --page-width: 1160px;
}

/* Normalização final: um único sistema de páginas e menus internos. */
.bible-shell,
.guided-shell,
.account-page-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
}

.bible-topbar,
.guided-topbar,
.account-page-header {
    grid-column: 1;
    grid-row: 1;
    height: auto;
    min-height: 0;
}

.module-subnav {
    align-items: center;
    background: #f7f9fa;
    border-bottom: 1px solid #dfe5e9;
    color: #29475e;
    display: flex;
    flex-direction: row;
    grid-column: 1;
    grid-row: 2;
    height: auto;
    min-height: 54px;
    padding: 7px 24px;
}

.module-subnav > div {
    display: none;
}

.module-subnav nav {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    min-width: 0;
}

.module-subnav nav button,
.module-subnav > button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #496273;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: 500 12px/1 Arial, sans-serif;
    gap: 7px;
    grid-template-columns: none;
    height: auto;
    margin: 0;
    min-height: 38px;
    padding: 8px 12px;
    text-align: left;
    width: auto;
}

.module-subnav nav button span,
.module-subnav > button span {
    color: #aa7a25;
    font-size: 16px;
    text-align: center;
}

.module-subnav nav button:hover,
.module-subnav nav button.is-active,
.module-subnav > button:hover {
    background: #e6eef2;
    color: #224b68;
}

.module-subnav > button {
    border-left: 1px solid #d7e0e5;
    border-radius: 0;
    font-size: 10px;
    margin-left: auto;
    padding-left: 16px;
}

.bible-panel,
.guided-list-view,
.guided-journey-view,
.account-page-content {
    grid-column: 1;
    grid-row: 3;
}

.guided-topbar,
.account-page-header {
    padding-bottom: 22px;
    padding-top: 22px;
}

.guided-list-view,
.guided-journey-view {
    min-height: 0;
}

body.guided-page-open .guided-topbar {
    display: grid;
}

.guided-shell:has(.guided-journey-view:not([hidden])) .guided-topbar {
    display: none;
}

.account-page-content {
    box-sizing: border-box;
}

@media (max-width: 820px) {
    .bible-shell,
    .guided-shell,
    .account-page-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .module-subnav {
        display: flex;
        min-height: 50px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        padding: 6px 10px;
        scrollbar-width: none;
    }

    .module-subnav::-webkit-scrollbar {
        display: none;
    }

    .module-subnav nav {
        flex-wrap: nowrap;
        width: max-content;
    }

    .module-subnav nav button,
    .module-subnav > button {
        font-size: 11px;
        min-height: 36px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .module-subnav > button {
        display: none;
    }

    .guided-shell:has(.guided-journey-view:not([hidden])) .guided-topbar {
        display: grid;
    }

    .guided-topbar,
    .account-page-header {
        min-height: 0;
        padding: 16px;
    }
}

body {
    background: #f5f7f9;
}

.site-frame {
    background: #fff;
    box-shadow: 0 10px 35px rgba(6, 37, 66, .14);
    margin: 0;
    max-width: none;
    min-height: 100vh;
    width: 100%;
}

.top-header {
    min-height: 88px;
    padding: 14px max(34px, calc((100% - var(--page-width)) / 2));
}

.brand {
    flex-basis: 420px;
}

.brand-logo {
    max-height: 62px;
    max-width: 390px;
}

.header-actions .social-link {
    display: none;
}

.header-actions {
    gap: 28px;
}

.mobile-nav-toggle,
.mobile-account-link {
    display: none;
}

.donate-button,
.banner-donate {
    background: linear-gradient(180deg, #d59a1d, #b87600);
    border-radius: 6px;
    box-shadow: 0 7px 15px rgba(178, 113, 0, .24);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .02em;
    padding: 13px 23px;
    text-transform: uppercase;
}

.header-account {
    align-items: center;
    background: transparent;
    border: 0;
    border-left: 1px solid #e0e5e9;
    border-radius: 0;
    box-shadow: none;
    color: var(--brand-blue-dark);
    display: grid;
    flex: 0 0 245px;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 18px;
    min-height: 52px;
    padding: 6px 10px 6px 25px;
    text-align: left;
}

.header-account.is-authenticated {
    background: transparent;
    color: var(--brand-blue-dark);
}

.header-account-avatar {
    display: none;
}

.header-account::after {
    color: var(--brand-blue);
    content: "⌄";
    font: 800 17px/1 Arial, sans-serif;
    grid-column: 2;
    grid-row: 1;
    text-align: center;
}

.header-account:hover,
.header-account:focus-visible {
    background: #f5f8fa;
    border-left-color: #ced9e2;
    box-shadow: none;
    outline: none;
}

.header-account-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
    width: 100%;
}

.header-account-copy strong,
.header-account-copy > span,
.header-account-copy [data-account-email] {
    display: block;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-account-copy strong,
.header-account.is-authenticated .header-account-copy strong {
    color: var(--brand-blue-dark);
    font: 800 14px/1.2 Arial, sans-serif;
    text-transform: capitalize;
}

.header-account-copy > span,
.header-account-copy [data-account-email],
.header-account.is-authenticated .header-account-copy [data-account-email] {
    color: #61758a;
    font: 11px/1.25 Arial, sans-serif;
}

.main-nav {
    background: linear-gradient(90deg, #073f6c, #07517f, #073f6c);
    border-bottom: 1px solid rgba(4, 42, 73, .3);
    box-shadow: 0 3px 9px rgba(5, 48, 82, .08);
    gap: 22px;
    height: 47px;
    justify-content: center;
    padding: 0 20px;
}

.main-nav a {
    border-radius: 4px;
    color: rgba(255,255,255,.9);
    font-family: Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .005em;
    padding: 0 8px;
    text-transform: none;
    transition: background-color .18s ease, color .18s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    background: rgba(255,255,255,.08);
    color: #fff;
    outline: none;
}

.main-nav a.active {
    color: #f2c45e;
    font-weight: 600;
}

.main-nav a.active::after {
    background: #e5b33d;
    bottom: 0;
    height: 2px;
    left: 8px;
    right: 8px;
}

.more-resources-link {
    gap: 5px;
}

.mobile-menu-only {
    display: none !important;
}

.more-resources-link span {
    font-size: 14px;
    line-height: 1;
}

.devotee-main {
    background:
        radial-gradient(circle at 19% 18%, rgba(233, 240, 246, .65), transparent 28%),
        #fbfcfd;
    max-width: none;
    padding: 14px max(22px, calc((100% - 930px) / 2)) 8px;
}

.page-title {
    display: none;
}

body.bible-page-open .welcome-hero,
body.bible-page-open .blessing-banner,
body.rosary-page-open .welcome-hero,
body.rosary-page-open .blessing-banner,
body.devotion-page-open .welcome-hero,
body.devotion-page-open .blessing-banner,
body.guided-page-open .welcome-hero,
body.guided-page-open .blessing-banner,
body.app-resource-page-open .welcome-hero,
body.app-resource-page-open .blessing-banner {
    display: none !important;
}

body.account-page-open .welcome-hero,
body.account-page-open .resources,
body.account-page-open .blessing-banner {
    display: none !important;
}

.account-page-module[hidden] {
    display: none !important;
}

.account-page-module {
    margin: 0 auto 24px;
    max-width: 1080px;
}

.account-page-shell {
    background: #fdfcf9;
    border: 1px solid #e4e3df;
    box-shadow: 0 18px 45px rgba(5,39,69,.11);
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    min-height: 700px;
    overflow: hidden;
}

.account-page-sidebar {
    background: linear-gradient(180deg, #061f37, #043b67);
    color: #fff;
    display: flex;
    flex-direction: column;
    grid-row: 1 / 5;
    padding: 30px 11px;
}

.account-page-mark {
    align-items: center;
    color: #e0ad3d;
    display: flex;
    font-size: 50px;
    height: 100px;
    justify-content: center;
}

.account-page-sidebar nav {
    display: grid;
    gap: 7px;
    margin-top: 25px;
}

.account-page-sidebar button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: grid;
    font: 400 13px Arial, sans-serif;
    gap: 9px;
    grid-template-columns: 24px 1fr;
    min-height: 48px;
    padding: 9px 10px;
    text-align: left;
}

.account-page-sidebar button span {
    color: #f0c35c;
    font-size: 20px;
}

.account-page-sidebar button:hover,
.account-page-sidebar button.is-active {
    background: rgba(255,255,255,.12);
}

.account-page-header {
    align-items: center;
    border-bottom: 1px solid #e9e4dc;
    display: flex;
    justify-content: space-between;
    padding: 25px 30px;
}

.account-page-header span {
    color: #a97924;
    font: 600 11px Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-page-header h2 {
    color: #173b59;
    font: 600 32px Georgia, serif;
    margin: 4px 0;
}

.account-page-header p {
    color: #71808d;
    font: 400 13px Arial, sans-serif;
    margin: 0;
}

.account-page-header button {
    background: #fff;
    border: 1px solid #ddcaa5;
    border-radius: 7px;
    color: #36566d;
    cursor: pointer;
    font-weight: 500;
    padding: 11px 15px;
}

.account-page-content {
    margin: 0 auto;
    max-width: 760px;
    padding: 25px 30px 38px;
    width: 100%;
}

.account-page-content .account-summary {
    align-items: center;
    background: #fff;
    border: 1px solid #e6e0d7;
    border-radius: 9px;
    display: flex;
    gap: 14px;
    padding: 14px 17px;
}

.account-summary-avatar {
    align-items: center;
    background: #f4ead5;
    border-radius: 50%;
    color: #a8751e;
    display: flex;
    font-size: 24px;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.account-page-content .account-summary strong,
.account-page-content .account-summary small {
    display: block;
}

.account-page-content .account-summary strong {
    color: #29475e;
    font: 600 17px Georgia, serif;
}

.account-page-content .account-summary small {
    color: #71808d;
    font: 400 12px Arial, sans-serif;
    margin-top: 3px;
}

.account-page-content .account-tabs {
    background: #f1f4f6;
    border-radius: 8px;
    display: grid;
    gap: 5px;
    grid-template-columns: 1fr 1fr;
    margin: 16px 0;
    padding: 5px;
}

.account-page-content .account-tabs button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #617585;
    cursor: pointer;
    font-weight: 500;
    min-height: 40px;
}

.account-page-content .account-tabs button.is-active {
    background: #fff;
    box-shadow: 0 2px 7px rgba(20,47,68,.07);
    color: #244b68;
}

.account-form-card,
.account-preferences {
    background: #fff;
    border: 1px solid #e6e0d8;
    border-radius: 9px;
    padding: 20px;
}

.account-page-content .auth-form {
    display: grid;
    gap: 14px;
}

.account-page-content .auth-form[hidden],
.account-page-content .account-preferences[hidden] {
    display: none !important;
}

.account-page-content .auth-form label {
    color: #455d6e;
    display: grid;
    font: 500 12px Arial, sans-serif;
    gap: 6px;
}

.account-page-content .auth-form input {
    background: #fbfcfc;
    border: 1px solid #d7e0e5;
    border-radius: 7px;
    color: #29475e;
    font: 400 14px Arial, sans-serif;
    min-height: 44px;
    padding: 10px 12px;
}

.account-page-content .primary-action {
    background: #b98319;
    font-weight: 600;
    min-height: 44px;
}

.account-preferences {
    margin-top: 18px;
}

.account-preferences h3 {
    color: #29475e;
    font: 600 17px Georgia, serif;
    margin: 0 0 14px;
}

.account-page-content .account-actions {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-page-content .account-actions button {
    background: #fff;
    border: 1px solid #d8e0e5;
    border-radius: 7px;
    color: #3f5b6e;
    font-weight: 500;
    min-height: 42px;
    padding: 9px 12px;
}

.account-page-content .account-actions .danger-action {
    background: #fff8f8;
    border-color: #efd1d4;
    color: #a33b48;
}

.welcome-hero {
    background: linear-gradient(90deg, #fffaf4 0%, rgba(255,255,255,.9) 53%, rgba(229,241,248,.68) 100%);
    border: 1px solid #e5bd74;
    border-radius: 10px;
    box-shadow: 0 12px 27px rgba(15, 58, 91, .1);
    display: grid;
    grid-template-columns: 1.15fr .85fr 260px;
    height: 244px;
    margin: 0 auto 10px;
    max-width: 930px;
    overflow: hidden;
    position: relative;
}

.welcome-copy {
    padding: 25px 32px;
    position: relative;
    z-index: 2;
}

.welcome-copy h1 {
    color: var(--brand-blue-dark);
    font: 700 29px/1.1 Georgia, serif;
    margin: 0;
}

.welcome-copy h1::after {
    background: var(--brand-gold);
    content: "";
    display: block;
    height: 2px;
    margin-top: 8px;
    width: 45px;
}

.welcome-copy > p {
    color: #174f7d;
    font: 15px Georgia, serif;
    margin: 13px 0;
}

.welcome-copy blockquote {
    color: #174f7d;
    display: grid;
    grid-template-columns: 24px 1fr;
    margin: 0;
}

.welcome-copy blockquote > span {
    color: #e0b96c;
    font: 40px/1 Georgia, serif;
}

.welcome-copy blockquote p {
    font: italic 14px/1.35 Georgia, serif;
    margin: 5px 0 3px;
}

.welcome-copy cite {
    color: #c77800;
    font: italic 12px Georgia, serif;
    grid-column: 2;
}

.welcome-sanctuary {
    align-self: end;
    background: linear-gradient(180deg, transparent, rgba(212, 221, 220, .45));
    height: 82%;
    opacity: .45;
}

.welcome-hero > img {
    align-self: end;
    filter: drop-shadow(0 5px 9px rgba(47, 41, 22, .18));
    height: 265px;
    justify-self: center;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.resources {
    margin: 0 auto;
    max-width: 930px;
}

.section-head {
    text-align: center;
}

.section-head h2 {
    color: var(--brand-blue-dark);
    font-size: 27px;
    margin: 7px 0 11px;
}

.section-head h2::after {
    background: var(--brand-gold);
    content: "";
    display: block;
    height: 2px;
    margin: 6px auto 0;
    width: 58px;
}

.section-head p {
    display: none;
}

.resource-grid {
    gap: 10px 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-card {
    border-color: #e2e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 53, 82, .07);
    grid-template-columns: 48px minmax(0, 1fr) 13px;
    min-height: 78px;
    padding: 10px 12px;
}

.resource-card:hover,
.resource-card:focus-visible {
    border-color: #d7a344;
    box-shadow: 0 10px 22px rgba(15, 53, 82, .13);
    transform: translateY(-2px);
}

.resource-icon {
    height: 44px;
    width: 44px;
}

.resource-icon svg {
    height: 25px;
    width: 25px;
}

.resource-copy strong {
    font-size: 14px;
}

.resource-copy small {
    font-size: 10.5px;
    line-height: 1.25;
}

.resource-card[data-open-resource="doar"] {
    display: none;
}

.blessing-banner {
    border-radius: 8px;
    gap: 14px;
    grid-template-columns: 48px 185px 1px minmax(0, 1fr) auto 70px;
    margin: 12px auto 0;
    max-width: 930px;
    min-height: 68px;
    padding: 8px 14px;
}

.blessing-banner::before {
    background: #ead5b0;
    content: "";
    grid-column: 3;
    height: 42px;
}

.heart-badge {
    grid-column: 1;
}

.mission-copy {
    display: grid;
    grid-column: 2;
}

.mission-copy strong {
    align-self: end;
    color: var(--brand-blue-dark);
    font: 700 17px Georgia, serif;
}

.mission-copy small {
    color: #5c7590;
    font-size: 10px;
}

.blessing-banner p {
    grid-column: 4;
    margin: 0;
}

.banner-donate {
    grid-column: 5;
    position: relative;
    text-decoration: none;
    z-index: 2;
}

.rosary-watermark {
    grid-column: 6;
}

.site-footer {
    background: linear-gradient(110deg, #063b68, #004a7c, #06365f);
    margin-top: 0;
}

/* Bíblia: experiência de leitura ampla no desktop. */
.bible-module {
    margin: 0 auto 22px;
    max-width: 1180px;
}

.bible-shell {
    background: #fdfcf9;
    border: 1px solid #e4e7e9;
    border-radius: 0;
    box-shadow: 0 18px 45px rgba(5, 39, 69, .12);
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    overflow: hidden;
}

.bible-sidebar {
    background: linear-gradient(180deg, #061f37, #043b67);
    color: #fff;
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1 / 10;
    min-height: 720px;
    padding: 25px 11px 18px;
}

.bible-sidebar-mark {
    align-items: center;
    color: #dda52d;
    display: flex;
    flex-direction: column;
    height: 105px;
    justify-content: center;
}

.bible-sidebar-mark span {
    font: 44px/30px Georgia, serif;
}

.bible-sidebar-mark svg {
    fill: none;
    height: 38px;
    margin-top: 4px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 46px;
}

.bible-sidebar nav {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.bible-sidebar nav button,
.bible-sidebar-mode {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: grid;
    font: 13px Arial, sans-serif;
    gap: 10px;
    grid-template-columns: 24px 1fr;
    min-height: 48px;
    padding: 9px 10px;
    text-align: left;
}

.bible-sidebar nav button span {
    color: #f3c95f;
    font-size: 22px;
    text-align: center;
}

.bible-sidebar nav button:hover,
.bible-sidebar nav button.is-active {
    background: rgba(255, 255, 255, .12);
}

.bible-sidebar-mode {
    border-top: 1px solid rgba(255,255,255,.25);
    border-radius: 0;
    font-size: 10px;
    margin-top: auto;
    padding-top: 18px;
}

.bible-topbar {
    align-items: center;
    background: linear-gradient(90deg, #fffdf9, #fff);
    border-bottom: 1px solid #eee8df;
    color: var(--brand-blue-dark);
    display: grid;
    gap: 20px;
    grid-column: 2;
    grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.3fr);
    padding: 25px 28px;
}

.bible-heading > span {
    display: none;
}

.bible-topbar h2 {
    color: var(--brand-blue-dark);
    font: 700 31px/1.05 Georgia, serif;
    margin: 0;
}

.bible-heading p {
    color: #718092;
    margin-top: 6px;
}

.bible-header-search {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dde2;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(10, 39, 65, .05);
    display: grid;
    gap: 8px;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    padding: 5px 6px 5px 13px;
}

.bible-header-search > span {
    color: #536779;
    display: block;
    font-size: 23px;
}

.bible-header-search input {
    border: 0;
    font: 14px Arial, sans-serif;
    min-height: 38px;
    min-width: 0;
    outline: 0;
}

.bible-header-search button {
    background: var(--brand-blue);
    border: 0;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    min-height: 36px;
    padding: 0 14px;
}

.bible-topbar .bible-tools {
    display: none;
}

.bible-panel {
    background: #fdfcf9;
    grid-column: 2;
    padding: 22px 30px 32px;
}

.bible-library-controls {
    background: #fff;
    border: 1px solid #e7e2dc;
    border-radius: 10px;
    display: block;
    padding: 8px;
}

.bible-search-line {
    display: none;
}

.bible-tabs {
    background: #faf8f4;
    border: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
}

.bible-tabs button {
    border-radius: 8px;
    min-height: 48px;
}

.bible-tabs button.is-active {
    background: linear-gradient(100deg, #073a66, #07528a);
    box-shadow: 0 5px 12px rgba(5, 58, 101, .2);
    color: #fff;
}

.bible-library-summary {
    align-items: center;
    color: var(--brand-blue-dark);
    display: flex;
    font: 700 18px Georgia, serif;
    gap: 14px;
    margin: 23px 0 15px;
}

.bible-library-summary::after {
    background: #e4ded4;
    content: "";
    flex: 1;
    height: 1px;
}

.bible-books-grid {
    gap: 12px 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bible-book-card {
    background: #fff;
    border: 1px solid #e5e0d9;
    border-radius: 10px;
    box-shadow: 0 5px 13px rgba(28, 44, 58, .05);
    min-height: 92px;
    padding: 15px 36px 15px 18px;
}

.bible-book-card span {
    color: #c88b13;
    font-size: 29px;
    min-width: 52px;
}

.bible-book-card:hover,
.bible-book-card:focus-visible {
    border-color: #d1a651;
    box-shadow: 0 9px 20px rgba(25, 53, 76, .1);
    transform: translateY(-2px);
}

/* Caminhada bíblica */
.guided-module {
    margin: 0 auto 24px;
    max-width: 1180px;
}

.guided-shell {
    background: #fdfcf9;
    border: 1px solid #e4e3df;
    border-radius: 0;
    box-shadow: 0 18px 45px rgba(5, 39, 69, .11);
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    overflow: hidden;
}

.guided-sidebar {
    background: linear-gradient(180deg, #061f37, #043b67);
    color: #fff;
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1 / 10;
    min-height: 750px;
    padding: 25px 10px 18px;
}

.guided-sidebar-mark {
    align-items: center;
    color: #dda52d;
    display: flex;
    flex-direction: column;
    height: 105px;
    justify-content: center;
}

.guided-sidebar-mark span {
    font: 44px/31px Georgia, serif;
}

.guided-sidebar-mark b {
    font: 400 43px/25px Georgia, serif;
    transform: scaleX(1.35);
}

.guided-sidebar nav {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.guided-sidebar nav button,
.guided-sidebar-mode {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: grid;
    font: 400 13px Arial, sans-serif;
    gap: 9px;
    grid-template-columns: 24px 1fr;
    min-height: 48px;
    padding: 9px 10px;
    text-align: left;
}

.guided-sidebar nav button span {
    color: #f0c35c;
    font-size: 21px;
    text-align: center;
}

.guided-sidebar nav button:hover,
.guided-sidebar nav button.is-active {
    background: rgba(255,255,255,.12);
}

.guided-sidebar nav button.is-active {
    color: #f5cc65;
}

.guided-sidebar-mode {
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,.24);
    font-size: 10px;
    margin-top: auto;
    padding-top: 18px;
}

.guided-topbar,
.guided-list-view,
.guided-journey-view {
    grid-column: 2;
}

.guided-topbar {
    background: #fffdf9;
    border-bottom: 1px solid #eee8df;
    color: #173b59;
    padding: 20px 28px;
}

@media (min-width: 821px) {
    .guided-shell:has(.guided-journey-view:not([hidden])) .guided-topbar {
        display: none;
    }
}

/* Sistema visual compartilhado pelos módulos espirituais. */
.rosary-module,
.devotion-module,
.app-resource-module {
    margin: 0 auto 24px;
    max-width: 1120px;
}

.rosary-shell,
.devotion-shell,
.app-resource-shell {
    background: #fdfcf9;
    border: 1px solid #e4e2dd;
    border-radius: 10px;
    box-shadow: 0 16px 38px rgba(8, 39, 64, .09);
    overflow: hidden;
}

.rosary-topbar,
.devotion-topbar,
.app-resource-topbar {
    align-items: center;
    background: linear-gradient(90deg, #fffdf9, #fbfaf8);
    border-bottom: 1px solid #e9e4dc;
    color: #173b59;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 25px 30px;
}

.rosary-topbar > button,
.devotion-topbar > button,
.app-resource-topbar > button:first-child {
    grid-column: 2;
    grid-row: 1;
}

.rosary-topbar > div:first-of-type,
.devotion-topbar > div,
.app-resource-topbar > div {
    grid-column: 1;
    grid-row: 1;
}

.rosary-topbar span,
.devotion-topbar span,
.app-resource-topbar span {
    color: #a97924;
    font: 600 11px/1.2 Arial, sans-serif;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.rosary-topbar h2,
.devotion-topbar h2,
.app-resource-topbar h2 {
    color: #173b59;
    font: 600 34px/1.1 Georgia, serif;
    margin: 5px 0 0;
}

.rosary-topbar button,
.devotion-topbar button,
.app-resource-topbar button {
    background: #fff;
    border: 1px solid #dec99f;
    border-radius: 7px;
    color: #456073;
    cursor: pointer;
    font-weight: 500;
    min-height: 42px;
    padding: 9px 14px;
}

.rosary-tools {
    display: flex;
    gap: 9px;
    grid-column: 2;
    grid-row: 1;
}

.rosary-topbar > button {
    display: none;
}

.rosary-tools select {
    background: #fff;
    border: 1px solid #d7dfe4;
    border-radius: 7px;
    color: #354f62;
    font: 500 13px Arial, sans-serif;
    min-height: 42px;
    padding: 8px 34px 8px 12px;
}

.rosary-progress,
.consecration-progress-card,
.novena-progress-card {
    background: #fff;
    border: 1px solid #e7e1d8;
    border-radius: 9px;
    box-shadow: 0 4px 13px rgba(28, 44, 58, .045);
    margin: 18px 24px 0;
    padding: 17px 20px;
}

.rosary-progress > div,
.consecration-progress-card > div:last-child,
.novena-progress-card > div:last-child {
    background: #eee9e0;
    border-radius: 99px;
    height: 7px;
    overflow: hidden;
}

.rosary-progress > div span,
.consecration-progress-card > div:last-child span,
.novena-progress-card > div:last-child span {
    background: #c79227;
    border-radius: inherit;
    height: 100%;
}

.rosary-progress p {
    color: #6b7b87;
    font: 400 12px Arial, sans-serif;
}

.rosary-progress strong {
    color: #29475e;
    font-weight: 600;
}

.rosary-layout {
    align-items: stretch;
    background: #fff;
    border: 1px solid #e7e1d8;
    border-radius: 10px;
    box-shadow: 0 6px 17px rgba(28,44,58,.05);
    gap: 0;
    grid-template-columns: minmax(330px, .9fr) minmax(0, 1.1fr);
    margin: 16px 24px 0;
    overflow: hidden;
    padding: 0;
}

.rosary-visual {
    background: radial-gradient(circle at 50% 45%, #fffdf7, #f7f2e9 72%, #f0eadf);
    min-height: 440px;
}

.rosary-visual img {
    filter: drop-shadow(0 7px 9px rgba(58,45,25,.12));
}

.rosary-prayer-card {
    align-content: center;
    background: #fff;
    border: 0;
    border-left: 1px solid #ece6dd;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    padding: 35px;
}

.rosary-prayer-card > span {
    color: #a97924;
    font: 600 11px Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rosary-prayer-card h3 {
    color: #112f49;
    font: 600 34px/1.12 Georgia, serif;
}

.rosary-prayer-card p {
    color: #3f5362;
    font: 400 15px/1.65 Arial, sans-serif;
}

.rosary-prayer-card small {
    color: #788793;
    font-weight: 400;
}

.rosary-actions {
    gap: 10px;
    justify-content: flex-end;
    padding: 18px 24px 24px;
}

.rosary-actions button {
    background: #fff;
    border: 1px solid #dec99f;
    border-radius: 7px;
    color: #526979;
    font-weight: 500;
    min-height: 44px;
    min-width: 150px;
}

.rosary-actions button:last-child {
    background: #073d69;
    border-color: #073d69;
    color: #fff;
}

.devotion-layout {
    gap: 18px;
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
    padding: 22px;
}

.devotion-visual,
.devotion-panel,
.consecration-day-card,
.consecration-days-panel,
.novena-day-card,
.novena-days-panel,
.heart-panel {
    background: #fff;
    border: 1px solid #e6e0d8;
    border-radius: 9px;
    box-shadow: 0 5px 15px rgba(28,44,58,.045);
}

.devotion-visual {
    color: #fff;
    overflow: hidden;
}

.devotion-visual strong {
    font: 600 27px/1.2 Georgia, serif;
}

.devotion-visual p {
    font: 400 14px/1.55 Arial, sans-serif;
}

.devotion-panel {
    padding: 22px;
}

.devotion-form label,
.novena-intention,
.consecration-day-card label,
.heart-panel label {
    color: #465e6e;
    font: 500 12px Arial, sans-serif;
}

.devotion-form textarea,
.novena-intention textarea,
.consecration-day-card textarea,
.heart-panel input {
    background: #fbfcfc;
    border: 1px solid #d8e0e5;
    border-radius: 7px;
    color: #29475e;
    font: 400 14px Arial, sans-serif;
}

.primary-action,
.consecration-day-card > button,
.heart-panel form button,
.novena-actions button {
    background: #b98319;
    border-radius: 7px;
    font-weight: 600;
}

.devotion-history h3,
.consecration-days-panel h3,
.novena-days-panel h3,
.heart-panel h3,
.consecration-day-card h3,
.novena-day-card h3 {
    color: #29475e;
    font-family: Georgia, serif;
    font-weight: 600;
}

.consecration-layout,
.novena-layout,
.heart-layout {
    gap: 18px;
    padding: 22px;
}

.consecration-day-card p,
.novena-day-card p,
.heart-panel > p {
    color: #536672;
    font: 400 14px/1.65 Arial, sans-serif;
}

.chat-room {
    padding: 22px;
}

.chat-intro {
    background: #f1f6f8;
    border-color: #d9e3e8;
}

.chat-messages {
    background: #f8f9f9;
    border-color: #dfe5e8;
}

.chat-form button {
    background: #073d69;
    font-weight: 600;
}

.guided-topbar button {
    background: #fff;
    border: 1px solid #ddcaa5;
    color: #315067;
    font-weight: 500;
}

.guided-topbar span {
    color: #a97924;
    font-weight: 600;
}

.guided-topbar h2 {
    color: #173b59;
    font-weight: 600;
}

.guided-journey-view {
    background: #fdfcf9;
    padding: 26px 30px 32px;
}

.guided-breadcrumb {
    color: #71808d;
    display: flex;
    font: 400 12px Arial, sans-serif;
    gap: 12px;
    margin: 0 4px 18px;
}

.guided-breadcrumb span {
    color: #1d5178;
    font-weight: 600;
}

.guided-breadcrumb i {
    color: #a9b1b7;
    font-style: normal;
}

.guided-breadcrumb strong {
    font-weight: 400;
}

.guided-journey-head {
    align-items: start;
    background: transparent;
    border: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto auto;
    margin-bottom: 18px;
    padding: 0 4px;
}

.guided-journey-head > div {
    grid-column: 1;
    grid-row: 1;
}

.guided-journey-head h3 {
    color: #112f49;
    font: 600 37px/1.08 Georgia, serif;
    margin: 0;
}

.guided-journey-head p {
    color: #71808d;
    font: 400 14px/1.4 Arial, sans-serif;
    margin: 8px 0 0;
}

.guided-journey-head button {
    background: #fff;
    border: 1px solid #ddcaa5;
    color: #36566d;
    font-weight: 500;
    min-height: 42px;
}

.guided-progress-card {
    background: #fff;
    border: 1px solid #e7e1d8;
    border-radius: 10px;
    box-shadow: 0 5px 14px rgba(28,44,58,.05);
    margin-bottom: 18px;
    padding: 18px 22px;
}

.guided-progress-card strong {
    color: #29475e;
    font-weight: 600;
}

.guided-progress-card span {
    color: #7d6c50;
    font-weight: 500;
}

.guided-progress-dots {
    gap: 4px;
    margin-top: 13px;
}

.guided-progress-dots span {
    background: #eee7da;
    border-radius: 99px;
    height: 6px;
}

.guided-progress-dots span.is-done,
.guided-progress-dots span.is-active {
    background: #c7942b;
}

.guided-day-layout {
    align-items: start;
    gap: 18px;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
}

.guided-day-card,
.guided-days-panel {
    background: #fff;
    border: 1px solid #e6e0d8;
    border-radius: 10px;
    box-shadow: 0 6px 17px rgba(28,44,58,.055);
    padding: 22px;
}

.guided-day-card > span {
    color: #b57d18;
    font: 600 11px Arial, sans-serif;
    letter-spacing: .06em;
}

.guided-day-card h3 {
    color: #112f49;
    font: 600 31px/1.12 Georgia, serif;
    margin: 14px 0 9px;
}

.guided-day-card > strong {
    color: #315b7a;
    font-weight: 500;
}

.guided-day-card > p {
    background: #fbf7ef;
    border: 1px solid #eee0c6;
    border-radius: 7px;
    color: #4c5d69;
    font: 400 14px/1.5 Arial, sans-serif;
    margin: 18px 0;
    padding: 16px;
}

.guided-day-card section {
    border-top: 0;
}

.guided-day-card section h4 {
    color: #29475e;
    font: 600 16px Georgia, serif;
}

.guided-day-card section h4::before {
    color: #c38b23;
    content: "—";
    margin-right: 10px;
}

.guided-day-card section p {
    color: #526571;
    font: 400 14px/1.55 Arial, sans-serif;
}

.guided-day-card button {
    font-weight: 500;
}

.guided-day-card button[data-guided-open-bible] {
    background: #083c68;
}

.guided-day-card button[data-guided-complete] {
    background: #fff;
    border: 1px solid #d9d4cc;
    color: #526571;
}

.guided-day-card label span {
    color: #5c6d79;
    font-weight: 500;
}

.guided-day-card textarea {
    background: #fbfcfc;
    border-color: #dfe4e7;
}

.guided-days-panel h3 {
    color: #29475e;
    font: 600 19px Georgia, serif;
}

.guided-day-tile {
    background: #fdfcf9;
    border-color: #e7e1d8;
    border-radius: 7px;
    min-height: 58px;
}

.guided-day-tile > span {
    background: #f5efe3;
    color: #b57d18;
    font-weight: 500;
}

.guided-day-tile strong {
    color: #3c5263;
    font-weight: 500;
}

.guided-day-tile small,
.guided-day-tile em {
    color: #7a8994;
    font-weight: 400;
}

.guided-day-tile.is-active {
    background: #fffdfa;
    border-color: #c99737;
}

.guided-day-tile.is-active > span,
.guided-day-tile.is-done > span {
    background: #174b71;
}

@media (min-width: 821px) {
    .guided-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .guided-sidebar {
        align-items: center;
        background: #f7f9fa;
        border-bottom: 1px solid #dfe5e9;
        color: #29475e;
        display: flex;
        flex-direction: row;
        grid-column: 1;
        grid-row: 2;
        min-height: 0;
        padding: 8px 24px;
    }

    .guided-sidebar-mark {
        display: none;
    }

    .guided-sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin: 0;
    }

    .guided-sidebar nav button {
        color: #476174;
        display: flex;
        font-size: 12px;
        gap: 7px;
        min-height: 38px;
        padding: 8px 12px;
    }

    .guided-sidebar nav button span {
        color: #a87925;
        font-size: 16px;
    }

    .guided-sidebar nav button:hover {
        background: #eaf0f3;
    }

    .guided-sidebar nav button.is-active {
        background: #e4edf2;
        color: #234c68;
    }

    .guided-sidebar-mode {
        border: 0;
        border-left: 1px solid #d7e0e5;
        color: #607685;
        display: flex;
        font-size: 10px;
        margin: 0 0 0 auto;
        min-height: 34px;
        padding: 7px 0 7px 16px;
        width: auto;
    }

    .guided-topbar {
        grid-column: 1;
        grid-row: 1;
    }

    .guided-list-view,
    .guided-journey-view {
        grid-column: 1;
        grid-row: 3;
    }
}

@media (max-width: 1000px) and (min-width: 821px) {
    .bible-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bible-topbar {
        grid-template-columns: 1fr;
    }
}

.footer-content {
    gap: 30px;
    grid-template-columns: 1.45fr 1fr 1.2fr 1fr;
    margin: 0 auto;
    max-width: 960px;
    padding: 22px 18px 16px;
}

.footer-content > div:nth-child(3) {
    display: none;
}

.footer-logo-card {
    background: #fff;
    border-radius: 5px;
    display: block;
    padding: 8px;
}

.footer-content h3 {
    color: #f0b938;
    font-size: 11px;
}

.footer-content a {
    font-size: 11px;
    line-height: 1.65;
}

.footer-bottom {
    justify-content: center;
    min-height: 36px;
    padding: 6px 20px;
}

.footer-bottom span {
    display: none;
}

.footer-bottom small {
    margin: 0;
}

@media (max-width: 980px) {
    .welcome-hero {
        grid-template-columns: 1.25fr .35fr 220px;
    }

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

    .main-nav {
        justify-content: flex-start;
    }

    .blessing-banner {
        grid-template-columns: 48px 175px 1px minmax(0, 1fr) auto;
    }

    .rosary-watermark {
        display: none;
    }
}

@media (max-width: 820px) {
    body.mobile-menu-open {
        overflow: hidden;
    }

    .top-header {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        min-height: 70px;
        padding: 10px 14px;
        position: relative;
        z-index: 50;
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }

    .brand-logo {
        max-height: 48px;
        max-width: min(245px, 58vw);
    }

    .header-actions {
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin: 0;
        width: auto;
    }

    .header-account {
        display: none;
    }

    .donate-button {
        box-shadow: none;
        font-size: 10px;
        padding: 10px 11px;
        white-space: nowrap;
    }

    .mobile-nav-toggle {
        align-items: center;
        background: #f3f7fa;
        border: 1px solid #d7e1e8;
        border-radius: 7px;
        display: flex;
        flex: 0 0 42px;
        flex-direction: column;
        gap: 5px;
        height: 42px;
        justify-content: center;
        margin-left: auto;
        order: 3;
        padding: 0;
    }

    .mobile-nav-toggle span {
        background: var(--brand-blue);
        border-radius: 2px;
        display: block;
        height: 2px;
        transition: transform .2s ease, opacity .2s ease;
        width: 20px;
    }

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

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

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

    .main-nav {
        align-content: start;
        background: linear-gradient(160deg, #073e6d, #032f57);
        box-shadow: 0 18px 35px rgba(2, 29, 53, .28);
        display: none;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        height: auto;
        left: 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        padding: 16px;
        position: absolute;
        right: 0;
        top: 70px;
        z-index: 45;
    }

    .mobile-menu-open .main-nav {
        display: grid;
    }

    .main-nav a {
        align-items: center;
        background: rgba(255, 255, 255, .07);
        border: 1px solid rgba(255, 255, 255, .1);
        border-radius: 8px;
        display: flex;
        font-family: Arial, sans-serif;
        font-size: 13px;
        justify-content: flex-start;
        min-height: 52px;
        padding: 10px 12px;
        white-space: normal;
    }

    .main-nav a.active {
        background: rgba(210, 147, 22, .2);
        border-color: rgba(241, 190, 84, .65);
        color: #ffd56e;
    }

    .main-nav a.active::after {
        display: none;
    }

    .main-nav .mobile-menu-only {
        display: flex !important;
    }

    .main-nav .more-resources-link {
        display: none;
    }

    .mobile-account-link {
        background: #fff;
        border: 0;
        border-radius: 8px;
        color: var(--brand-blue-dark);
        display: grid;
        gap: 3px;
        grid-column: 1 / -1;
        margin-top: 4px;
        min-height: 60px;
        padding: 11px 14px;
        text-align: left;
    }

    .mobile-account-link span {
        font-size: 14px;
        font-weight: 900;
    }

    .mobile-account-link small {
        color: #5c7185;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .devotee-main {
        padding: 12px;
    }

    .bible-shell {
        border: 0;
        box-shadow: none;
        display: block;
    }

    .guided-shell {
        display: block;
    }

    .guided-sidebar,
    .guided-breadcrumb {
        display: none;
    }

    .guided-topbar {
        background: #f7f9fa;
        border-bottom: 1px solid #dfe6ea;
        color: #29475e;
        display: grid;
        padding: 15px;
    }

    .guided-topbar h2 {
        color: #29475e;
        font-size: 22px;
    }

    .guided-list-view,
    .guided-journey-view {
        padding: 14px;
    }

    .guided-journey-head {
        grid-template-columns: 1fr auto;
    }

    .guided-journey-head h3 {
        font-size: 28px;
    }

    .guided-journey-head button[data-guided-reset] {
        grid-column: 2;
        grid-row: 1;
    }

    .guided-journey-head button[data-guided-back-list] {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: start;
    }

    .guided-day-layout {
        grid-template-columns: 1fr;
    }

    .account-page-shell {
        display: block;
        min-height: 0;
    }

    .account-page-sidebar {
        display: none;
    }

    .account-page-header {
        align-items: flex-start;
        padding: 18px;
    }

    .account-page-header h2 {
        font-size: 26px;
    }

    .account-page-header p {
        max-width: 230px;
    }

    .account-page-header button {
        font-size: 11px;
        padding: 9px 10px;
    }

    .account-page-content {
        padding: 15px;
    }

    .account-form-card,
    .account-preferences {
        padding: 15px;
    }

    .rosary-shell,
    .devotion-shell,
    .app-resource-shell {
        border-radius: 8px;
    }

    .rosary-topbar,
    .devotion-topbar,
    .app-resource-topbar {
        align-items: stretch;
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .rosary-topbar > div:first-of-type,
    .devotion-topbar > div,
    .app-resource-topbar > div {
        grid-column: 1;
        grid-row: 1;
    }

    .rosary-topbar h2,
    .devotion-topbar h2,
    .app-resource-topbar h2 {
        font-size: 27px;
    }

    .rosary-tools {
        display: grid;
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: 1fr auto;
    }

    .rosary-topbar > button {
        display: block;
        grid-column: 1;
        grid-row: 3;
        justify-self: start;
    }

    .devotion-topbar > button,
    .app-resource-topbar > button:first-child {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .rosary-progress,
    .consecration-progress-card,
    .novena-progress-card {
        margin: 12px 12px 0;
        padding: 14px;
    }

    .rosary-layout {
        grid-template-columns: 1fr;
        margin: 12px 12px 0;
    }

    .rosary-visual {
        min-height: 330px;
    }

    .rosary-prayer-card {
        border-left: 0;
        border-top: 1px solid #ece6dd;
        padding: 22px;
    }

    .rosary-prayer-card h3 {
        font-size: 28px;
    }

    .rosary-actions {
        padding: 14px 12px 18px;
    }

    .devotion-layout,
    .consecration-layout,
    .novena-layout,
    .heart-layout {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .bible-sidebar,
    .bible-header-search {
        display: none;
    }

    .bible-topbar {
        align-items: stretch;
        background: #fbfaf8;
        border-bottom: 0;
        color: #183d5b;
        display: block;
        padding: 20px 18px 8px;
    }

    .bible-heading > span {
        display: none;
    }

    .bible-topbar h2 {
        color: #173b59;
        font: 600 27px/1.12 Georgia, serif;
    }

    .bible-heading p {
        color: #667b8b;
        font: 400 13px/1.4 Arial, sans-serif;
        margin: 6px 0 0;
        max-width: 340px;
    }

    .bible-topbar .bible-tools {
        display: grid;
        gap: 5px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-top: 14px;
    }

    .bible-topbar .bible-tools button {
        background: transparent;
        border: 1px solid #dce3e7;
        border-radius: 6px;
        color: #526a7b;
        font: 500 11px/1 Arial, sans-serif;
        min-height: 35px;
        overflow: hidden;
        padding: 8px 4px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bible-topbar .bible-tools button:hover,
    .bible-topbar .bible-tools button:focus-visible {
        background: #f1f5f7;
        border-color: #c8d5dc;
        color: #254d69;
        outline: none;
    }

    .bible-topbar .bible-tools button.is-active {
        background: #e7eef2;
        border-color: #d0dce3;
        color: #214b69;
        font-weight: 600;
    }

    .bible-panel {
        background: #fbfaf8;
        padding: 12px 18px 24px;
    }

    .bible-library-controls {
        background: transparent;
        border: 0;
        display: grid;
        gap: 10px;
        padding: 0;
    }

    .bible-search-line {
        display: block;
    }

    .bible-search-line input {
        background: #fff;
        border: 1px solid #d8dfe3;
        border-radius: 8px;
        color: #29475e;
        font: 400 14px Arial, sans-serif;
        box-shadow: 0 3px 9px rgba(25, 52, 72, .045);
        min-height: 52px;
        padding: 12px 14px 12px 42px;
    }

    .bible-search-line {
        position: relative;
    }

    .bible-search-line::before {
        color: #345770;
        content: "⌕";
        font-size: 24px;
        left: 14px;
        line-height: 1;
        position: absolute;
        top: 14px;
        z-index: 1;
    }

    .bible-tabs {
        background: #f6f3ee;
        border: 1px solid #e4e0d9;
        border-radius: 8px;
        gap: 5px;
        padding: 4px;
    }

    .bible-tabs button {
        background: transparent;
        border: 0;
        color: #556876;
        font: 400 12px/1.2 Arial, sans-serif;
        min-height: 48px;
        padding: 9px 7px;
    }

    .bible-tabs button::before {
        color: #315978;
        content: "♜";
        font-size: 18px;
        margin-right: 8px;
    }

    .bible-tabs button:last-child::before {
        content: "†";
    }

    .bible-tabs button.is-active {
        background: linear-gradient(100deg, #073d69, #0b527f);
        box-shadow: 0 4px 10px rgba(7,61,105,.15);
        color: #fff;
    }

    .bible-tabs button.is-active::before {
        color: #e8cf8c;
    }

    .bible-library-summary {
        color: #26475f;
        font: 600 18px/1.25 Georgia, serif;
        letter-spacing: 0;
        margin: 24px 0 14px;
        text-transform: none;
    }

    .bible-book-card {
        background: rgba(255, 255, 255, .9);
        border-color: #e1ddd6;
        border-radius: 9px;
        box-shadow: 0 4px 12px rgba(26, 52, 72, .055);
        min-height: 92px;
        padding: 14px 40px 14px 14px;
    }

    .bible-book-card span {
        align-items: center;
        background: #fff8e9;
        border: 1px solid #dfbb73;
        border-radius: 8px;
        color: #b9872c;
        display: flex;
        font-weight: 500;
        height: 58px;
        justify-content: center;
        min-width: 58px;
    }

    .bible-book-card strong {
        color: #29475e;
        font-family: Georgia, serif;
        font-weight: 600;
    }

    .bible-book-card small {
        color: #72828e;
        font-weight: 400;
    }

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

    .welcome-hero {
        grid-template-columns: 1fr 150px;
        height: 238px;
        margin-bottom: 14px;
    }

    .welcome-copy {
        padding: 24px;
    }

    .welcome-sanctuary {
        display: none;
    }

    .welcome-hero > img {
        height: 225px;
    }

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

    .section-head h2 {
        font-size: 23px;
        line-height: 1.15;
    }

    .blessing-banner {
        grid-template-columns: 48px minmax(0, 1fr) auto;
    }

    .blessing-banner::before,
    .mission-copy {
        display: none;
    }

    .blessing-banner p {
        grid-column: 2;
    }

    .banner-donate {
        grid-column: 3;
    }
}

@media (max-width: 520px) {
    .top-header {
        padding: 12px 14px;
    }

    .donate-button {
        font-size: 0;
        padding: 10px 12px;
    }

    .donate-button::after {
        content: "♡ Doar";
        font-size: 11px;
    }

    .welcome-hero {
        grid-template-columns: 1fr;
        height: 270px;
    }

    .welcome-copy {
        padding: 21px;
    }

    .welcome-copy blockquote p {
        font-size: 13px;
    }

    .welcome-hero > img {
        bottom: 0;
        height: 155px;
        opacity: .22;
        position: absolute;
        right: -5px;
    }

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

    .bible-books-grid {
        grid-template-columns: 1fr;
    }

    .resource-card {
        grid-template-columns: 48px minmax(0, 1fr) 16px;
        min-height: 72px;
    }

    .blessing-banner {
        grid-template-columns: 42px 1fr;
        padding: 12px;
    }

    .banner-donate {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Layout interno consolidado — deve permanecer no fim do arquivo. */
.bible-shell,
.guided-shell,
.account-page-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
}

.bible-topbar,
.guided-topbar,
.account-page-header {
    grid-column: 1;
    grid-row: 1;
    height: auto;
    min-height: 0;
}

.module-subnav {
    align-items: center;
    background: #f7f9fa;
    border-bottom: 1px solid #dfe5e9;
    color: #29475e;
    display: flex;
    flex-direction: row;
    grid-column: 1;
    grid-row: 2;
    height: auto;
    min-height: 54px;
    padding: 7px 24px;
}

.module-subnav > div { display: none; }
.module-subnav nav {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    min-width: 0;
}

.module-subnav nav button,
.module-subnav > button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #496273;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: 500 12px/1 Arial, sans-serif;
    gap: 7px;
    height: auto;
    margin: 0;
    min-height: 38px;
    padding: 8px 12px;
    width: auto;
}

.module-subnav nav button span,
.module-subnav > button span { color: #aa7a25; font-size: 16px; }
.module-subnav nav button:hover,
.module-subnav nav button.is-active,
.module-subnav > button:hover { background: #e6eef2; color: #224b68; }
.module-subnav > button {
    border-left: 1px solid #d7e0e5;
    border-radius: 0;
    font-size: 10px;
    margin-left: auto;
    padding-left: 16px;
}

.bible-panel,
.guided-list-view,
.guided-journey-view,
.account-page-content { grid-column: 1; grid-row: 3; }
.guided-topbar,
.account-page-header { padding-bottom: 22px; padding-top: 22px; }
.guided-list-view,
.guided-journey-view { min-height: 0; }
body.guided-page-open .guided-topbar { display: grid; }
.guided-shell:has(.guided-journey-view:not([hidden])) .guided-topbar { display: none; }

@media (max-width: 820px) {
    .bible-shell,
    .guided-shell,
    .account-page-shell { display: grid; grid-template-columns: minmax(0, 1fr); }
    .module-subnav {
        display: flex !important;
        min-height: 50px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        padding: 6px 10px;
        scrollbar-width: none;
    }
    .module-subnav::-webkit-scrollbar { display: none; }
    .module-subnav nav { flex-wrap: nowrap; width: max-content; }
    .module-subnav nav button,
    .module-subnav > button {
        font-size: 11px;
        min-height: 36px;
        padding: 7px 10px;
        white-space: nowrap;
    }
    .module-subnav > button { display: none; }
    .guided-shell:has(.guided-journey-view:not([hidden])) .guided-topbar { display: grid; }
    .guided-topbar,
    .account-page-header { min-height: 0; padding: 16px; }
}

/* Leitor bíblico: paleta clara, sóbria e confortável para leitura longa. */
.bible-reader {
    --reader-accent: #b98522;
    --reader-border: #dfe4e7;
    --reader-ink: #243b4d;
    --reader-muted: #687b89;
    background: #f8fafb;
}

.bible-reader .reader-head {
    background: #f3f6f8;
    border: 1px solid var(--reader-border);
    border-radius: 9px;
    box-shadow: 0 3px 10px rgba(20, 48, 68, .04);
    color: var(--reader-ink);
    padding: 11px 13px;
}

.bible-reader .reader-head strong {
    color: #173b59;
    font-size: 20px;
    font-weight: 600;
}

.bible-reader .reader-head span {
    color: var(--reader-muted);
    font-size: 12px;
    font-weight: 500;
}

.bible-reader .reader-head button,
.bible-reader .reader-actions button,
.bible-reader .reader-nav button,
.bible-reader .chapter-picker button,
.bible-reader .reader-verse button {
    background: #fff;
    border: 1px solid #d9e0e4;
    border-radius: 7px;
    color: #31536a;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.bible-reader .reader-head button:hover,
.bible-reader .reader-actions button:hover,
.bible-reader .reader-nav button:hover,
.bible-reader .reader-verse button:hover {
    background: #eef3f6;
    border-color: #bfccd4;
    color: #123e5d;
}

.bible-reader .chapter-picker {
    scrollbar-color: #bdc8cf transparent;
    scrollbar-width: thin;
}

.bible-reader .chapter-picker button {
    background: #f1f4f6;
    border-color: transparent;
    color: #496171;
    font-weight: 600;
}

.bible-reader .chapter-picker button.is-active {
    background: #0b4d78;
    border-color: #0b4d78;
    box-shadow: 0 3px 8px rgba(11, 77, 120, .16);
    color: #fff;
}

.bible-reader .reader-page {
    background: #fff;
    border: 1px solid var(--reader-border);
    box-shadow: 0 5px 16px rgba(25, 52, 72, .045);
    color: var(--reader-ink);
    line-height: 1.72;
}

.bible-reader .reader-verse {
    border-bottom-color: #e7ebed;
    padding-bottom: 17px;
}

.bible-reader .reader-verse + .reader-verse {
    margin-top: 17px;
}

.bible-reader .reader-verse p {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 400;
}

.bible-reader .reader-verse sup {
    color: var(--reader-accent);
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
}

.bible-reader .reader-verse div {
    margin-top: 10px;
}

.bible-reader .reader-verse button {
    background: #f7f4ed;
    border-color: #ebe3d4;
    color: #526777;
    min-height: 32px;
    padding: 0 10px;
}

.bible-reader .reader-nav span {
    color: var(--reader-muted);
    font-size: 12px;
    font-weight: 500;
}

/* Modo leitura escuro sem preto absoluto ou contraste agressivo. */
.bible-reader.is-dark {
    background: #102c41;
}

.bible-reader.is-dark .reader-head {
    background: #17384f;
    border-color: #2c4c62;
    box-shadow: none;
    color: #edf3f5;
}

.bible-reader.is-dark .reader-head strong {
    color: #f2f5f6;
}

.bible-reader.is-dark .reader-head span,
.bible-reader.is-dark .reader-nav span {
    color: #b8c8d1;
}

.bible-reader.is-dark .reader-head button,
.bible-reader.is-dark .reader-actions button,
.bible-reader.is-dark .reader-nav button,
.bible-reader.is-dark .chapter-picker button,
.bible-reader.is-dark .reader-verse button {
    background: #21445b;
    border-color: #36566a;
    color: #e1eaee;
}

.bible-reader.is-dark .chapter-picker button.is-active {
    background: #d0a244;
    border-color: #d0a244;
    color: #132f42;
}

.bible-reader.is-dark .reader-page {
    background: #183448;
    border-color: #2e4c60;
    box-shadow: none;
    color: #e9eef0;
}

.bible-reader.is-dark .reader-verse {
    border-bottom-color: rgba(220, 231, 236, .12);
}

.bible-reader.is-dark .reader-verse sup {
    color: #d8b361;
}

.bible-reader.is-dark .reader-verse button {
    background: #203f54;
    color: #cdd9df;
}

@media (max-width: 520px) {
    .bible-reader .reader-head {
        gap: 9px;
        padding: 10px;
    }

    .bible-reader .reader-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .bible-reader .reader-actions button {
        min-width: 0;
    }

    .bible-reader .reader-page {
        padding: 17px 15px;
    }

    .bible-reader .reader-verse p {
        font-size: 15px;
    }
}

/* Vela virtual — composição devocional editorial. */
.candle-module {
    max-width: 1120px;
}

.candle-shell {
    background: #fffdf9;
    border-color: #eadfc9;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(29, 47, 61, .1);
}

.candle-ornament {
    align-items: center;
    background: linear-gradient(100deg, #062f52, #073e69, #052c4c);
    display: flex;
    height: 48px;
    justify-content: center;
}

.candle-ornament span {
    align-items: center;
    display: flex;
    gap: 9px;
    width: 174px;
}

.candle-ornament span::before,
.candle-ornament span::after {
    background: linear-gradient(90deg, transparent, #d9a536);
    content: "";
    flex: 1;
    height: 1px;
}

.candle-ornament span::after {
    background: linear-gradient(90deg, #d9a536, transparent);
}

.candle-ornament span {
    color: #d9a536;
}

.candle-layout {
    align-items: stretch;
    display: grid;
    gap: 34px;
    grid-template-areas:
        "visual header"
        "visual intro"
        "visual form"
        "visual history";
    grid-template-columns: minmax(310px, .72fr) minmax(0, 1.28fr);
    grid-template-rows: auto auto auto 1fr;
    padding: 20px;
}

.candle-panel {
    display: contents;
}

.candle-visual {
    background: #edf2f2;
    border: 1px solid #c99a3f;
    border-radius: 15px;
    box-shadow: none;
    grid-area: visual;
    min-height: 590px;
    position: relative;
}

.candle-visual::after {
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 11px;
    content: "";
    inset: 6px;
    pointer-events: none;
    position: absolute;
}

.candle-visual img {
    display: block;
    height: 100%;
    min-height: 590px;
    object-fit: cover;
    object-position: 50% 50%;
    width: 100%;
}

.candle-topbar {
    align-items: start;
    background: transparent;
    border: 0;
    display: grid;
    gap: 20px;
    grid-area: header;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 0 4px;
}

.candle-topbar > div {
    grid-column: 1;
    grid-row: 1;
}

.candle-topbar > button {
    align-items: center;
    background: transparent;
    border-color: #d9b978;
    color: #244760;
    display: inline-flex;
    font-size: 13px;
    gap: 7px;
    grid-column: 2;
    grid-row: 1;
    min-height: 40px;
    padding: 8px 14px;
}

.candle-topbar > button span {
    color: #b77a0a;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0;
}

.candle-topbar > div > span {
    color: #b57908;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
}

.candle-topbar h2 {
    color: #0b3455;
    font-size: 46px;
    font-weight: 500;
    letter-spacing: -.025em;
    margin-top: 8px;
}

.candle-intro {
    color: #557084;
    font: 400 13px/1.5 Arial, sans-serif;
    grid-area: intro;
    margin: 0 0 3px;
}

.candle-form {
    align-content: start;
    display: grid;
    gap: 13px;
    grid-area: form;
    margin: 0;
}

.candle-form label > span {
    color: #183d59;
    font: 600 16px Georgia, serif;
}

.candle-form textarea {
    background: #fff;
    border-color: #d9d3c8;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(31, 49, 62, .025);
    line-height: 1.55;
    min-height: 138px;
    padding: 15px;
    resize: vertical;
}

.candle-form .primary-action {
    align-items: center;
    background: linear-gradient(180deg, #dca117, #c28608);
    box-shadow: 0 7px 14px rgba(184, 121, 0, .16);
    display: inline-flex;
    font-family: Georgia, serif;
    font-size: 15px;
    gap: 9px;
    justify-content: center;
    justify-self: start;
    min-height: 48px;
    min-width: 245px;
    padding: 10px 20px;
}

.candle-form .primary-action span {
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 19px;
}

.candle-history {
    border-top: 1px solid #ead7ad;
    grid-area: history;
    margin-top: 16px;
    padding-top: 20px;
}

.candle-history h3 {
    color: #123b5b;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 13px;
}

.candle-history > div {
    display: grid;
    gap: 9px;
}

.candle-history .devotion-item {
    align-items: center;
    background: #fffdf9;
    border: 1px solid #e6d5b3;
    border-radius: 9px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 18px;
    min-height: 70px;
    padding: 10px 14px;
}

.candle-history .devotion-item::before {
    align-items: center;
    background: #fff8e9;
    border: 1px solid #eedcb7;
    border-radius: 50%;
    color: #cf9012;
    content: "♦";
    display: flex;
    font-size: 17px;
    grid-column: 1;
    grid-row: 1 / 3;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.candle-history .devotion-item::after {
    color: #c98c18;
    content: "›";
    font-size: 28px;
    grid-column: 3;
    grid-row: 1 / 3;
}

.candle-history .devotion-item strong,
.candle-history .devotion-item span {
    grid-column: 2;
}

.candle-history .devotion-item strong {
    color: #203e55;
    font: 600 14px Georgia, serif;
}

.candle-history .devotion-item span,
.candle-history .devotion-empty {
    color: #73828c;
    font: 400 12px Arial, sans-serif;
}

@media (max-width: 820px) {
    .candle-shell {
        border-radius: 9px;
    }

    .candle-ornament {
        height: 34px;
    }

    .candle-layout {
        gap: 16px;
        grid-template-areas:
            "header"
            "visual"
            "intro"
            "form"
            "history";
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        padding: 14px;
    }

    .candle-topbar {
        align-items: center;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 2px 0 0;
    }

    .candle-topbar > div {
        grid-column: 1;
    }

    .candle-topbar > button {
        grid-column: 2;
        grid-row: 1;
    }

    .candle-topbar h2 {
        font-size: 32px;
    }

    .candle-visual,
    .candle-visual img {
        min-height: 320px;
    }

    .candle-visual {
        max-height: 420px;
    }

    .candle-visual img {
        object-position: 50% 36%;
    }

    .candle-form .primary-action {
        justify-self: stretch;
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .candle-layout {
        padding: 11px;
    }

    .candle-topbar h2 {
        font-size: 28px;
    }

    .candle-topbar > button {
        font-size: 12px;
        padding: 7px 10px;
    }

    .candle-visual,
    .candle-visual img {
        min-height: 270px;
    }
}

/* Altar integral no desktop; os controles permanecem HTML sobre a área vazia. */
@media (min-width: 821px) {
    body.devotion-page-open .devotee-main {
        padding-left: max(20px, calc((100% - 1160px) / 2));
        padding-right: max(20px, calc((100% - 1160px) / 2));
    }

    .candle-shell {
        aspect-ratio: 3 / 2;
        background-image: url("../img/vela-virtual-altar.png");
        background-position: center top;
        background-repeat: no-repeat;
        background-size: cover;
        border: 0;
        border-radius: 0;
        min-height: 700px;
        position: relative;
    }

    .candle-ornament {
        display: none;
    }

    .candle-layout {
        gap: 35px;
        grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
        min-height: 700px;
        padding: 54px 62px 65px;
    }

    .candle-visual {
        background: transparent;
        border: 0;
        border-radius: 0;
        min-height: 0;
        overflow: visible;
    }

    .candle-visual::after,
    .candle-visual img {
        display: none;
    }

    .candle-topbar {
        align-items: start;
        padding: 8px 4px 0;
    }

    .candle-topbar > div {
        text-align: center;
    }

    .candle-topbar > button {
        position: absolute;
        right: 54px;
        top: 39px;
    }

    .candle-topbar h2 {
        font-size: clamp(36px, 3.8vw, 48px);
        line-height: 1;
    }

    .candle-intro {
        color: #36546a;
        margin: 0;
        text-align: center;
    }

    .candle-form {
        gap: 10px;
        padding: 0 10px;
    }

    .candle-form textarea {
        background: rgba(255, 252, 246, .78);
        min-height: 108px;
    }

    .candle-form .primary-action {
        justify-self: center;
        min-height: 44px;
    }

    .candle-history {
        background: rgba(255, 250, 241, .35);
        border: 1px solid rgba(184, 130, 31, .55);
        border-radius: 10px;
        margin: 4px 4px 0;
        max-height: 180px;
        overflow-y: auto;
        padding: 13px 15px;
    }

    .candle-history h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .candle-history .devotion-item {
        background: rgba(255, 253, 248, .75);
        min-height: 58px;
        padding-bottom: 7px;
        padding-top: 7px;
    }
}
