/* Shared panel hierarchy: opaque reading surfaces, richer inner cards and restrained lift. */
:root{--card-fill:#182c3c;--card-wash:linear-gradient(135deg,#263d5259,#182c3c80);--card-inner:#223a4b;--card-inner-wash:linear-gradient(135deg,#36516870,#243c5275);--card-edge:#65717c;--card-shadow:0 3px 12px #00000020;--card-hover-shadow:0 9px 22px #00000038}
:root[data-theme='light']{--card-fill:#f1efe5;--card-wash:linear-gradient(135deg,#e5ebdf55,#e8e4d966);--card-inner:#e5e9dc;--card-inner-wash:linear-gradient(135deg,#d5e0d455,#dce4d366);--card-edge:#b9b798;--card-shadow:0 3px 12px #655e3914;--card-hover-shadow:0 9px 22px #655e3928}
@media screen{
html:root[data-theme] body main :is(.card:not(.sheet-form-card),.mini-card,.entry-card,.subcard,.book-reading-panel,.reference-book,.volume,.reference-player,.reference-campaign,.board-card,.board-empty,.community-welcome,.community-steps,.destination-card,.world-kingdom,.myth-section,.board-form,.request-success,.studio-record,.chronicle-card,.chronicle-secret,.chronicle-gate,.master-chapter,.master-tool-card,.master-pillar,.master-callout,.mestre-gate,.mestre-block,.hall-empty,.hall-player,.hall-invitation,.campaign-feature,.lede-note,.reading-toc,.filter-bar,.stat,.mp-panel,.mp-section,.sheet-dossier,.portrait-card,.studio-block,.studio-combatant,.atlas-result,.collection-card,.collection-empty,.catalog-option){background-color:var(--card-fill)!important;background-image:var(--card-wash),var(--panel-floral)!important;background-size:100% 100%,640px 640px;background-repeat:no-repeat,repeat;border-color:var(--card-edge)!important;box-shadow:var(--card-shadow)!important}
html:root[data-theme] body main :is(.preview-attrs>*,.preview-life,.preview-power,.attr-box,.attr-points,.readonly-pill,.entry-stats>div,.preview-list .row,.mini-card,.subcard,.collection-card,.catalog-option,.studio-combatant){background-color:var(--card-inner)!important;background-image:var(--card-inner-wash),var(--panel-floral)!important;background-size:100% 100%,640px 640px;border-color:var(--card-edge)!important;box-shadow:var(--card-shadow)!important}
}
@media screen and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
html:root[data-theme] body main :is(.card:not(.sheet-form-card),.mini-card,.entry-card,.subcard,.book-reading-panel,.reference-book,.volume,.reference-player,.reference-campaign,.board-card,.board-empty,.community-welcome,.community-steps,.destination-card,.world-kingdom,.myth-section,.board-form,.request-success,.studio-record,.chronicle-card,.chronicle-secret,.chronicle-gate,.master-chapter,.master-tool-card,.master-pillar,.master-callout,.mestre-gate,.mestre-block,.hall-empty,.hall-player,.hall-invitation,.campaign-feature,.lede-note,.reading-toc,.filter-bar,.stat,.mp-panel,.mp-section,.sheet-dossier,.portrait-card,.studio-block,.studio-combatant,.atlas-result,.collection-card,.collection-empty,.catalog-option,.preview-attrs>*,.preview-life,.preview-power,.attr-box,.attr-points,.readonly-pill,.entry-stats>div,.preview-list .row,.mini-card,.subcard,.collection-card,.catalog-option,.studio-combatant):not(.reference-book,.volume){transition:translate .18s ease}
html:root[data-theme] body main :is(.card:not(.sheet-form-card),.mini-card,.entry-card,.subcard,.book-reading-panel,.reference-book,.volume,.reference-player,.reference-campaign,.board-card,.board-empty,.community-welcome,.community-steps,.destination-card,.world-kingdom,.myth-section,.board-form,.request-success,.studio-record,.chronicle-card,.chronicle-secret,.chronicle-gate,.master-chapter,.master-tool-card,.master-pillar,.master-callout,.mestre-gate,.mestre-block,.hall-empty,.hall-player,.hall-invitation,.campaign-feature,.lede-note,.reading-toc,.filter-bar,.stat,.mp-panel,.mp-section,.sheet-dossier,.portrait-card,.studio-block,.studio-combatant,.atlas-result,.collection-card,.collection-empty,.catalog-option,.preview-attrs>*,.preview-life,.preview-power,.attr-box,.attr-points,.readonly-pill,.entry-stats>div,.preview-list .row,.mini-card,.subcard,.collection-card,.catalog-option,.studio-combatant):not(.reference-book,.volume):hover{translate:0 -4px;box-shadow:var(--card-hover-shadow)!important}
}

@media screen{
html:root[data-theme] body main :is(.myth-section,.board-form){padding:24px;border:1px solid var(--card-edge);border-radius:18px;box-sizing:border-box}
html:root[data-theme] body :is(.sheet-catalog-dialog,.catalog-option,.collection-card){background-color:var(--card-inner)!important;background-image:var(--card-inner-wash),var(--panel-floral)!important;background-size:100% 100%,640px 640px;border-color:var(--card-edge)!important}
}
@media screen{html:root[data-theme] body main .myth-section>p{background:none;padding:0;border-radius:0}}
/* Ivory botanical panels: animated artwork only; text and controls stay still. */
@media screen{
:root[data-theme='light']{--panel-floral:url('../img/decoracao/painel-floral-energia-estatico.svg');--panel-veil:linear-gradient(135deg,#fffaf008,#fffaf015);--card-fill:#f7f3e8;--card-wash:linear-gradient(135deg,#fffaf008,#fffaf015);--card-inner:#f2eddf;--card-inner-wash:linear-gradient(135deg,#e7d9b510,#fffaf010);--card-edge:#d2c7ab}
}
@media(prefers-reduced-motion:reduce){:root[data-theme='light']{--panel-floral:url('../img/decoracao/painel-floral-claro.webp')}}
/* Moonlit silver accents are exclusive to the dark theme. */
@media screen{
html:root[data-theme='dark']{--color-primary:#c3ced8;--color-primary-hover:#edf4fa;--color-primary-active:#a1b1bf;--color-gold:#c3ced8;--color-gold-highlight:#293b4b;--color-primary-highlight:#293b4b;--color-warning:#c3ced8;--panel-floral:url('../img/decoracao/painel-floral-prata-estatico.svg');--panel-veil:linear-gradient(135deg,#17283810,#17283830);--card-wash:linear-gradient(135deg,#17283810,#17283830);--card-inner-wash:linear-gradient(135deg,#29425420,#17283820);--card-edge:#667b8c}
html:root[data-theme='dark'] body :is(.btn-primary,.header-sheet,.music-play){background:linear-gradient(115deg,#d9e2e9,#aebfcd 48%,#d7e2eb)!important;border-color:#bacbd8!important;color:#14212c!important;box-shadow:inset 0 1px #ffffff70}
html:root[data-theme='dark'] body :is(.btn-secondary,.reference-player,.reference-campaign,.art-slot,.figure,.portrait-frame){border-color:#91a5b7!important}
html:root[data-theme='dark'] body :is(.small-rule,.reference-heading>span,.primary-nav a[aria-current]:after){background:linear-gradient(90deg,#91a5b755,#d2dee9,#91a5b755)!important}
html:root[data-theme='dark'] body.reference-home main .reference-hero .hero-side-note{color:#e3ecf4!important;border-color:#98afc1!important}
html:root[data-theme='dark'] body :is(.eyebrow,.wordmark,.reference-hero .eyebrow,.portrait-heading,.portrait-frame>span){color:var(--color-primary)}
html:root[data-theme='dark'] body :is(.brand-symbol img,.footer-star,.player-badge img){filter:grayscale(1) brightness(1.2)}
html:root[data-theme='dark'] body::before{filter:grayscale(1)}
html:root[data-theme='dark'] .site-header{border-bottom-color:#91a5b755}
html:root[data-theme='dark'] body main [role='tab'][aria-selected='true']{color:#e3ecf4!important;border-color:#91a5b7!important;background:#293e4f!important}
}
@media(prefers-reduced-motion:reduce){html:root[data-theme='dark']{--panel-floral:url('../img/decoracao/painel-floral-prata-estatico.svg')}}
@media screen{
html:root[data-theme='dark'] .hero-player{border-color:#91a5b770;color:#d0dce7}
html:root[data-theme='dark'] .hero-toggle{border-color:#bacbd8;background:linear-gradient(140deg,#e1e9f0,#9eafbe)}
html:root[data-theme='dark'] .hero-seek{background:linear-gradient(to right,#bacbd8 var(--progress,0%),#91a5b740 var(--progress,0%))}
html:root[data-theme='dark'] .hero-seek::-webkit-slider-thumb{background:#cbd9e4}
html:root[data-theme='dark'] .hero-seek::-moz-range-thumb{background:#cbd9e4}
}

/* A fixed botanical mask clips a compositor-driven travelling light. */
@media screen and (prefers-reduced-motion:no-preference){
.botanical-positioned{position:relative}
.botanical-light{--branch-light:#e8f5ff;position:absolute;inset:0;border-radius:inherit;pointer-events:none;overflow:hidden;contain:paint;z-index:0}
[data-theme='light'] .botanical-light{--branch-light:#f4d885}
.botanical-branches{position:absolute;inset:0;overflow:hidden;mask:url('../img/decoracao/ramos-luz.svg') center bottom/640px 640px repeat;transform-origin:50% 100%;animation:botanical-wind 8s ease-in-out 1 both;animation-play-state:paused}
.botanical-branches::before{content:"";position:absolute;inset:0;background:var(--branch-light);opacity:.13}
.botanical-branches::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 20%,var(--branch-light) 44%,#fff 50%,var(--branch-light) 56%,transparent 80%);transform:translateX(-110%);opacity:0;animation:botanical-flow 8s ease-in-out 1 both;animation-play-state:paused}
.botanical-light.is-awake .botanical-branches,.botanical-light.is-awake .botanical-branches::after{animation-play-state:running;will-change:transform,opacity}
@keyframes botanical-wind{0%,100%{transform:translate(0,0) rotate(0deg)}35%{transform:translate(3px,-2px) rotate(.22deg)}70%{transform:translate(-2px,1px) rotate(-.18deg)}}
@keyframes botanical-flow{0%{transform:translateX(-110%);opacity:0}12%{opacity:.65}70%{opacity:.65}88%,100%{transform:translateX(110%);opacity:0}}
}
@media print,(prefers-reduced-motion:reduce){.botanical-light{display:none!important}}

/* A soft, borderless reading veil quiets the branches across every shared surface. */
@media screen{
html:root[data-theme='light']{--reading-veil:radial-gradient(ellipse at center,rgba(255,253,247,.82) 0%,rgba(255,253,247,.72) 58%,rgba(255,253,247,.28) 100%);--panel-veil:var(--reading-veil);--card-wash:var(--reading-veil);--card-inner-wash:var(--reading-veil)}
html:root[data-theme='dark']{--reading-veil:radial-gradient(ellipse at center,rgba(20,36,50,.82) 0%,rgba(20,36,50,.72) 58%,rgba(20,36,50,.28) 100%);--panel-veil:var(--reading-veil);--card-wash:var(--reading-veil);--card-inner-wash:var(--reading-veil)}
/* The travelling light remains decorative and does not compete with the text. */
.botanical-light{opacity:.55}
}

/* Crisp text uses stronger ink contrast without halos over the floral artwork. */
@media screen{
html:root[data-theme='dark']{--color-text:#f3f2ed;--color-text-muted:#d8dfe4;--color-text-faint:#c5cfd7}
html:root[data-theme='light']{--color-text:#29261f;--color-text-muted:#494236;--color-text-faint:#5b5040}
html:root[data-theme] body,html:root[data-theme] body *{text-shadow:none!important}
}
.back-to-top{position:fixed;right:16px;bottom:72px;z-index:90;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid var(--color-primary);border-radius:999px;background:linear-gradient(145deg,var(--color-surface-2),var(--color-surface));color:var(--color-text);box-shadow:0 5px 20px #0004;font:inherit;font-size:25px;line-height:1;cursor:pointer;text-shadow:none}
.back-to-top[hidden]{display:none}.back-to-top:focus-visible{outline:3px solid var(--color-primary);outline-offset:3px}
@media(max-width:700px){.back-to-top{right:12px;bottom:68px;padding:0}}
@media print{.back-to-top{display:none!important}html:root[data-theme] body *{text-shadow:none!important}}
