/* Quiet botanical textures on content panels, independent of the curtain backdrop. */
/* Let the portrait of the Three Faces follow the full height of its reading column. */
@media(min-width:1101px){
  #religiao-img{align-self:stretch;position:relative;min-height:0}
  #religiao-img>.figure{position:absolute;inset:0;margin:0;aspect-ratio:auto}
  #religiao-img .img-slot{height:100%;aspect-ratio:auto}
}
/* One consistent reading surface across all books, including generated prose. */
html:root[data-theme] body .book-body :is(.book-reading-panel,section>p,section>ul,section>ol){background-color:var(--color-surface);background-image:var(--panel-veil),var(--panel-floral);background-size:100% 100%,640px 640px;border:1px solid var(--color-border);border-radius:18px;padding:24px;margin-bottom:24px;box-sizing:border-box}
html:root[data-theme] body .book-body .book-reading-panel>.section-head{background:none;border:0;box-shadow:none;border-radius:0;padding:0;margin:0 0 22px}
html:root[data-theme] body .book-body :is(.book-reading-panel,.entry-card,.card,.subcard) .reading-note,html:root[data-theme] body .book-body .book-reading-panel>p,html:root[data-theme] body .book-body .book-reading-panel>.card{background:none;border:0;box-shadow:none;border-radius:0;padding:0}
.book-reading-panel .col-text p+p{margin-top:16px}.book-reading-panel>.two-col{margin:0}.book-reading-panel>p{max-width:none}.book-reading-panel>:last-child{margin-bottom:0!important}
@media(max-width:640px){html:root[data-theme] body .book-body :is(.book-reading-panel,section>p,section>ul,section>ol){padding:18px}}
/* Reading surfaces protect exposed headings and prose from the curtain artwork. */
html:root[data-theme] body main :is(.page-head,.section-head,.reference-heading,.editorial-head,.hall-heading,.mp-section-head,.back-link,.mp-breadcrumb){background-color:var(--color-surface);background-image:var(--panel-veil),var(--panel-floral);background-size:100% 100%,640px 640px;border:1px solid var(--color-border);border-radius:16px;padding:20px 24px;box-shadow:0 4px 16px #0000000a}
html:root[data-theme] body main .mp-section{background-color:var(--color-surface);background-image:var(--panel-veil),var(--panel-floral);background-size:100% 100%,640px 640px;border:1px solid var(--color-border);border-radius:22px;padding:28px}
html:root[data-theme] body main :is(.reference-book,.volume){background-color:var(--color-surface);border:1px solid var(--color-border);border-radius:18px;padding:12px}
html:root[data-theme] body main>p,html:root[data-theme] body main>section>p{background:var(--color-surface);padding:16px 20px;border-radius:12px}
@media(max-width:640px){html:root[data-theme] body main :is(.page-head,.section-head,.reference-heading,.editorial-head,.hall-heading,.mp-section-head,.mp-section){padding:18px 16px}}
@media print{html:root[data-theme] body main :is(.page-head,.section-head,.reference-heading,.editorial-head,.hall-heading,.mp-section-head,.mp-section,.back-link,.mp-breadcrumb){background:none;box-shadow:none}}
:root{--panel-floral:url('../img/decoracao/painel-floral-escuro.webp');--panel-veil:linear-gradient(135deg,rgba(20,36,55,.6),rgba(16,29,47,.76) 55%,rgba(20,36,55,.6))}
:root[data-theme='light']{--panel-floral:url('../img/decoracao/painel-floral-claro.webp');--panel-veil:linear-gradient(135deg,rgba(255,252,245,.5),rgba(250,245,234,.7) 55%,rgba(244,235,218,.5))}
html:root[data-theme] body :is(main .card:not(.sheet-form-card),main .mini-card,main .entry-card,main .subcard,main .reference-player,main .reference-campaign,main .board-card,main .board-empty,main .community-welcome,main .community-steps,main .destination-card,main .world-kingdom,main .chronicle-card,main .chronicle-secret,main .chronicle-gate,main .master-chapter,main .master-tool-card,main .master-pillar,main .master-callout,main .mestre-gate,main .mestre-block,main .hall-empty,main .hall-player,main .hall-invitation,main .campaign-feature,main .lede-note,main .reading-toc,main .filter-bar,main .stat,main .entry-stats>div,main .preview-attrs>*,main .preview-list .row,main .readonly-pill,main .table-wrap,.catalog-option,.collection-card,.collection-empty,.sheet-catalog-dialog,.music-panel,.atlas-result,#painel.painel){background-image:var(--panel-veil),var(--panel-floral);background-size:100% 100%,640px 640px;background-position:center,center bottom;background-repeat:no-repeat,repeat}
@media print{html:root[data-theme] body :is(main .card:not(.sheet-form-card),main .mini-card,main .entry-card,main .subcard,main .reference-player,main .reference-campaign,main .board-card,main .board-empty,main .community-welcome,main .community-steps,main .destination-card,main .world-kingdom,main .chronicle-card,main .chronicle-secret,main .chronicle-gate,main .master-chapter,main .master-tool-card,main .master-pillar,main .master-callout,main .mestre-gate,main .mestre-block,main .hall-empty,main .hall-player,main .hall-invitation,main .campaign-feature,main .lede-note,main .reading-toc,main .filter-bar,main .stat,main .entry-stats>div,main .preview-attrs>*,main .preview-list .row,main .readonly-pill,main .table-wrap,.catalog-option,.collection-card,.collection-empty,.sheet-catalog-dialog,.music-panel,.atlas-result,#painel.painel){background-image:none}}

/* Attribute surfaces have legacy theme backgrounds with !important. Keep the same texture here. */
html:root[data-theme] body .sheet-layout :is(.attr-box,.attr-points){background-image:var(--panel-veil),var(--panel-floral)!important;background-size:100% 100%,640px 640px;background-position:center,center bottom;background-repeat:no-repeat,repeat}
@media print{html:root[data-theme] body .sheet-layout :is(.attr-box,.attr-points){background-image:none!important}}

/* Readable prose and captions over the illustrated curtains. */
html:root[data-theme] body main :is(.reading-note,.hall-subtitle,.hero-side-note){background-color:var(--color-surface);background-image:var(--panel-veil),var(--panel-floral);background-size:100% 100%,640px 640px;color:var(--color-text);border:1px solid var(--color-border);border-radius:18px;padding:18px 22px;box-sizing:border-box;text-shadow:none}
html:root[data-theme] body main .hall-subtitle p{margin:0;color:var(--color-text)}
html:root[data-theme] body .hero-side-note{padding:16px 20px!important;color:var(--color-text)!important;text-shadow:none!important}
html:root[data-theme] body .mp-faq{width:100%;max-width:none;box-sizing:border-box}
.mp-faq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px}.mp-faq-intro{max-width:75ch;margin:16px 0 24px;color:var(--color-text-muted)}
@media(max-width:700px){.mp-faq-grid{grid-template-columns:1fr}}

html:root[data-theme] body.reference-home main .reference-hero .hero-side-note{background:#132333ed!important;background-image:none!important;color:#f8ecd1!important;border:1px solid #b89b5f!important;border-radius:14px!important;padding:14px 18px!important;text-shadow:none!important;font-weight:700;line-height:1.6;box-shadow:0 4px 18px #0003}
html:root[data-theme='light'] body.reference-home main .reference-hero .hero-side-note{background:rgba(255,255,255,.78)!important;color:var(--color-primary)!important;border-color:var(--color-primary)!important;box-shadow:0 4px 18px #78643e18}
html:root[data-theme='light'] body.reference-home main .reference-hero .hero-side-note span{background:var(--color-primary)}

/* Preserve degree names and readable gold badges in either theme. */
.book-body .chip:not(.chip-outline){white-space:nowrap;word-break:normal;overflow-wrap:normal;flex-shrink:0}
html:root[data-theme="light"] .chip-gold{background:#e8dcb8;color:#493b20}
/* Paragraphs inside decorated panels share their parent's floral surface. */
html:root[data-theme] body main :is(.community-welcome,.community-steps,.card,.mp-section,.myth-section,.book-reading-panel,.master-callout,.mestre-block,.campaign-feature,.hall-invitation,.chronicle-card,.board-card,.destination-card,.world-kingdom)>p:not(.lede-note,.reading-note){background:none;border:0;box-shadow:none;border-radius:0;padding:0}
