/* Tema único: especificidade explícita evita que o tema antigo do sistema vença. */
html:root,html:root[data-theme='dark']{
 --color-bg:#10171c;--color-surface:#171f25;--color-surface-2:#202a31;
 --color-surface-offset:#1b252c;--color-surface-offset-2:#253139;--color-surface-dynamic:#303e47;
 --color-text:#e9e8e2;--color-text-muted:#b9bfc2;--color-text-faint:#9ca7ad;--color-text-inverse:#11191e;
 --color-primary:#c2ac77;--color-primary-hover:#dcc99c;--color-primary-active:#a99365;--color-primary-highlight:#293036;
 --color-border:#454b4c;--color-divider:#35434b;--color-accent-2:#af8185;--color-accent-2-highlight:#30262d;
 --color-warning:#c2ac77;--color-warning-highlight:#2c2c27;--color-gold:#c2ac77;--color-gold-highlight:#303129;
 --font-display:Georgia,'Times New Roman',serif;--font-body:Georgia,'Times New Roman',serif;
 --radius-sm:2px;--radius-md:3px;--radius-lg:4px;--radius-xl:4px;
}
html:root[data-theme='light']{--color-bg:#e9eef0;--color-surface:#f6f8f8;--color-surface-2:#fff;--color-surface-offset:#dce4e8;--color-surface-offset-2:#d1dce2;--color-text:#24323c;--color-text-muted:#4d606e;--color-text-faint:#596c76;--color-primary:#78643e;--color-primary-hover:#5d4b2b;--color-text-inverse:#f8f9fa;--color-border:#b4c0c5;--color-divider:#c4cdd1;--color-primary-highlight:#dce3e5}
body{background:var(--color-bg);color:var(--color-text);font-family:var(--font-body);font-weight:400}
h1,h2,h3,h4,.page-head h1,.chronicle-card h2{font-family:var(--font-display);color:var(--color-text);font-weight:400}
p,li{color:inherit}.lede,.muted,.page-head .lede,.chronicle-meta span,.entry-meta,.mini-card p{color:var(--color-text-muted)}
.site-header,.reference-header{background:var(--color-bg);border-bottom:1px solid #86795655;height:64px;min-height:64px;padding:0 4.3%;align-items:center}
.reference-header .primary-nav{height:auto;align-items:center}.reference-header .primary-nav a{position:relative;padding:4px 0;font-size:14px;color:var(--color-text-muted);box-shadow:none;line-height:1.3}
.reference-header .primary-nav a[aria-current],.reference-header .primary-nav a:hover{color:var(--color-primary)}
.reference-header .primary-nav a[aria-current]:after{content:'';position:absolute;bottom:-5px;left:0;right:0;height:1px;background:linear-gradient(90deg,#ad9561,#d9c696,#ad9561)}
.wordmark,.eyebrow,.reference-hero .eyebrow,.reference-quick .ref-icon{color:var(--color-primary)}
.btn,.reference-home .btn,.reference-campaign .btn{font-family:var(--font-body);font-weight:400;border-radius:2px;min-height:40px;line-height:1.25}
.btn-primary,.reference-header .header-sheet{background:linear-gradient(115deg,#d3c18e 0%,#bda16b 48%,#d6c391 100%);border:1px solid #cfbc88;color:#152028;box-shadow:inset 0 1px #f1e5bc55;font-weight:600}
.btn-primary:hover{background:linear-gradient(115deg,#e0d1a6,#cbb580,#e0cea0)}
.btn-secondary,.reference-home .btn-secondary{background:linear-gradient(130deg,#1b252b77,#111a2188);border:1px solid #a38d5b;color:var(--color-text)}
.reference-main{max-width:none;width:100%}.reference-hero{height:auto;min-height:360px;overflow:visible;background:#10191f}
.reference-hero-copy{padding:54px 4.3% 32px;max-width:none}.reference-hero h1{font-size:clamp(38px,4.6vw,64px);font-weight:600;line-height:1.02;max-width:none;letter-spacing:-.035em;text-wrap:initial;color:#eae9e3;margin:10px 0 16px}
.reference-hero h1 .title-line{display:block;white-space:nowrap}.reference-hero-copy>p:not(.hero-footnote){font-weight:400;color:#d7dde0;font-size:17px}
.hero-footnote{color:#87949c;max-width:100%;margin-top:18px}.hero-art-slot{background:radial-gradient(ellipse at 80% 35%,#293941 0%,#18262f 38%,#10191f 78%)}
.hero-art-slot.art-ready:after{background:linear-gradient(90deg,#10191f 0%,#10191fd9 26%,#10191f55 59%,#10191f0a 100%)}
.reference-quick{background:linear-gradient(100deg,#111b22,#172229 55%,#111b22);height:70px}.reference-quick span{color:#e4e6e4}.reference-quick small{color:#a4afb4}
.reference-heading h2,.reference-book h3,.campaign-copy h3,.player-copy h3{color:var(--color-text);font-weight:400}.reference-heading>span{background:linear-gradient(90deg,#bdab7855,#cab987,#a3905c66)}
.reference-heading>a{color:var(--color-primary)}.reference-book p,.campaign-copy p,.player-copy p{color:var(--color-text-muted)}
.art-slot{background:radial-gradient(ellipse at 30% 12%,#34434b66,transparent 65%),linear-gradient(135deg,#1c2b34,#121c23);border-color:#7c827366}
.cover-capa-geografia{background:radial-gradient(ellipse at 25% 10%,#a69c7f44,transparent 65%),linear-gradient(135deg,#4a4b40,#273239)}
.cover-capa-sistema{background:radial-gradient(ellipse at 25% 10%,#946d6633,transparent 65%),linear-gradient(135deg,#343239,#19252d)}
.cover-capa-magia{background:radial-gradient(ellipse at 25% 10%,#7893af33,transparent 65%),linear-gradient(135deg,#293b4a,#121f2a)}
.cover-capa-bestiario{background:radial-gradient(ellipse at 25% 10%,#718e7d33,transparent 65%),linear-gradient(135deg,#293b37,#132326)}
.art-label,.cover-capa-geografia .art-label{color:#c3cbd0}.art-label code,.cover-capa-geografia .art-label code{color:#bead83}
.reference-player,.reference-campaign,.card,.mini-card,.subcard,.entry-card,.master-chapter,.master-tool-card,.master-pillar,.chronicle-card,.chronicle-secret,.mestre-gate,.hall-empty{background:radial-gradient(ellipse at 10% 0%,#59717b12,transparent 65%),linear-gradient(130deg,var(--color-surface-2),var(--color-surface));border:1px solid var(--color-border);box-shadow:inset 0 1px #dbe6e908;border-radius:3px}
.player-art,.campaign-art{background:linear-gradient(135deg,#273840,#121e26)}.reference-campaign .campaign-copy{padding-right:20px}.campaign-copy p,.campaign-copy h3{white-space:normal}
.content,.book-page .content{max-width:1440px;margin-inline:auto;padding-top:42px;gap:36px}.page-head{gap:16px;padding-bottom:24px}.page-head h1{font-size:clamp(34px,3.6vw,52px);line-height:1.12;margin:0}.page-head .lede{font-size:18px;line-height:1.7;max-width:70ch}.eyebrow{font-size:12px;letter-spacing:.17em;font-weight:400}
.book-toc{gap:10px}.book-toc a,.catalog-groups a,.chronicle-meta span{border-radius:2px;background:linear-gradient(130deg,var(--color-surface-2),var(--color-surface));border:1px solid var(--color-border);color:var(--color-text-muted);font-size:14px}
.lede-note,.master-callout,.mestre-block{background:linear-gradient(110deg,var(--color-surface-2),var(--color-surface));color:var(--color-text-muted);border:1px solid var(--color-border);border-radius:3px}
.entry-card h3,.entry-card h4,.section-head h2,.section-title{font-weight:400}.entry-body,.master-block,.chronicle-section{font-size:17px;line-height:1.75}input,select,textarea{color:var(--color-text);background-color:var(--color-surface)}
.reference-footer,.footer{background:var(--color-bg);border-color:var(--color-border)}.reference-footer>a,.reference-footer>a span{color:var(--color-text-muted)}
.symbol-slot{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:50px;min-width:50px;height:44px;position:relative;color:var(--color-primary)}.symbol-slot img{width:100%;height:100%;object-fit:contain}.symbol-slot code{font:7px/1.1 monospace;overflow-wrap:anywhere;text-align:center;position:absolute;inset:0;display:grid;align-items:center}.symbol-slot.loaded code{display:none}
@media(min-width:1250px){.reference-hero{min-height:400px}.reference-hero-copy{padding-top:64px}.reference-hero h1{font-size:64px}}
@media(max-width:850px){.reference-hero{min-height:365px}.reference-hero-copy{padding-top:42px}.reference-hero h1{font-size:clamp(30px,5.8vw,48px)}.reference-header .primary-nav{background:var(--color-bg)}.reference-quick{height:auto}.reference-header .primary-nav a{padding:10px 0}.reference-header .primary-nav a[aria-current]:after{bottom:5px;right:auto;width:24px}.reference-hero-copy>p:not(.hero-footnote){font-size:16px;max-width:480px}.content,.book-page .content{padding-top:30px}.reference-campaign{min-height:285px;height:auto;padding-bottom:10px}.campaign-copy{margin-top:140px}}
@media(max-width:480px){.reference-hero{min-height:480px}.reference-hero h1{font-size:clamp(27px,7.1vw,34px);letter-spacing:-.04em}.reference-hero-copy{padding:32px 20px 26px}.hero-art-slot .art-label{top:69%;bottom:5%}.reference-quick>a{gap:8px}.symbol-slot{width:34px;min-width:34px;height:38px}.symbol-slot code{font-size:6px}.page-head .lede{font-size:16px}.content{padding-inline:20px}.reference-header .primary-nav{position:absolute}.reference-heading h2{white-space:normal}}

/* Azul noturno e molduras de galeria em todas as páginas. */
html:root,html:root[data-theme='dark']{--color-bg:#080f20;--color-surface:#101c30;--color-surface-2:#182a40;--color-surface-offset:#13233a;--color-surface-offset-2:#1b2f47;--color-divider:#293d55;--color-border:#435069}
html:root[data-theme='light']{--color-bg:#e9eef0;--color-surface:#f6f8f8;--color-surface-2:#fff;--color-surface-offset:#dce4e8;--color-border:#b4c0c5}
.reference-hero{background:#0a1427}.hero-art-slot{background:radial-gradient(ellipse at 78% 30%,#263e59 0%,#12243b 45%,#080f20 88%)}.hero-art-slot.art-ready:after{background:linear-gradient(90deg,#080f20,#080f20c9 28%,#080f2033 65%,transparent)}.reference-quick{background:linear-gradient(105deg,#0a1529,#14263d,#0a1529)}
.art-slot:not(.hero-art-slot):not(.player-badge),.volume-cover,.chronicles-banner,.img-slot,.figure,.reference-player,.reference-campaign{border:2px solid #b39a61;border-radius:18px;overflow:hidden;box-shadow:0 0 0 1px #e6d29b33,inset 0 0 0 3px #0b162e,0 9px 28px #02081355;background-clip:padding-box}
.art-slot:not(.hero-art-slot):not(.player-badge):after,.volume-cover:after{content:'';position:absolute;inset:5px;border:1px solid #d6bd7c88;border-radius:12px;z-index:3;pointer-events:none}
.reference-player .player-art,.reference-campaign .campaign-art{border:0;border-radius:0;box-shadow:none}.reference-player .player-art:after,.reference-campaign .campaign-art:after{display:none}.player-badge{border:0;box-shadow:none}.figure img,.chronicles-banner{border-radius:16px}.reference-book:hover .art-slot,.volume:hover .volume-cover{border-color:#e1c787;box-shadow:0 0 0 1px #e6d29b66,0 12px 32px #02081366}
.reference-header .primary-nav{margin-left:18px;gap:22px}.reference-header .primary-nav a{font-size:13px}.reference-header{gap:18px}.destination-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.destination-card,.community-welcome,.community-steps{padding:30px;border:1px solid #b59a5d88;border-radius:16px;background:radial-gradient(ellipse at top left,#34516a33,transparent 65%),linear-gradient(130deg,var(--color-surface-2),var(--color-surface));box-shadow:inset 0 1px #f2d89411}.destination-card{display:flex;flex-direction:column;gap:16px}.destination-card h2{font-size:26px}.destination-card p,.community-welcome p,.community-steps li{font-size:17px;color:var(--color-text-muted);line-height:1.7}.destination-card a{margin-top:auto}.community-welcome h2{font-size:36px;margin:12px 0 18px}.community-welcome>p{max-width:68ch}.discord-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:26px}.connection-pending{font-size:14px;padding:12px 16px;border:1px dashed #9b895f77;border-radius:8px;color:var(--color-text-muted)}.community-steps h2{font-size:30px}.community-steps ol{padding-left:24px;margin:20px 0}.community-steps li+li{margin-top:10px}.footer-motto>a{font-size:inherit;letter-spacing:inherit;padding:0 14px;color:inherit;border-right:1px solid #5c5a4a}
@media(max-width:1450px){.reference-header .primary-nav{display:none;position:absolute;top:100%;left:0;right:0;margin:0;background:var(--color-bg);padding:16px 4.3%;border-bottom:1px solid var(--color-border);z-index:100}.reference-header .mobile-menu,.reference-home .reference-header .mobile-menu{display:grid}.reference-header .header-sheet{margin-left:auto}.reference-header{position:relative}.nav-open .reference-header .primary-nav{display:flex;flex-direction:column;align-items:stretch;gap:0}.reference-header .primary-nav a{padding:12px 0}.reference-header .primary-nav a[aria-current]:after{bottom:7px;right:auto;width:24px}}
@media(max-width:850px){.destination-grid{grid-template-columns:1fr 1fr}.community-welcome h2{font-size:30px}.reference-header .header-sheet{display:none}.reference-header .mobile-menu{margin-left:auto}}
@media(max-width:560px){.destination-grid{grid-template-columns:1fr}.destination-card,.community-welcome,.community-steps{padding:22px}.discord-actions{align-items:stretch;flex-direction:column}.community-welcome h2{font-size:28px}}

/* Molduras somente no perímetro externo. */
.art-slot:not(.hero-art-slot):not(.player-badge):after,.volume-cover:after{display:none!important}
.art-slot:not(.hero-art-slot):not(.player-badge),.volume-cover,.chronicles-banner,.img-slot,.figure,.reference-player,.reference-campaign{box-shadow:0 10px 28px #02081355}
.reference-campaign .art-slot.campaign-art,.reference-player .art-slot.player-art{border:0!important;border-radius:0!important;box-shadow:none!important}
body{font-size:17px;line-height:1.7}h1,h2,h3,h4,.reference-heading h2,.reference-book h3,.campaign-copy h3,.player-copy h3,.page-head h1,.destination-card h2{font-weight:600}.reference-book p,.player-copy p,.campaign-copy p{font-size:14px}.primary-nav a,.btn,.reference-home .btn{font-weight:600}.reference-header .primary-nav a{font-size:14px}
html body .attr-box input,html body .attr-grid input[type=number]{background:var(--color-surface);color:var(--color-text);border:1px solid var(--color-border);border-radius:6px;font-weight:700;box-shadow:none}html body .attr-box{background:var(--color-surface-offset);border-color:var(--color-border)}.attr-points{background:var(--color-surface-offset);color:var(--color-text)}.attr-points strong{color:var(--color-text)}
.btn,.reference-home .btn,.icon-btn,.destination-card,.reference-book,.volume{transition:transform 200ms ease,box-shadow 200ms ease,border-color 200ms ease,background 200ms ease}.btn:hover,.btn:focus-visible{transform:translateY(-2px);box-shadow:0 5px 18px #c8ab6430}.btn:active{transform:translateY(0) scale(.98)}.icon-btn:hover{transform:translateY(-2px)}.destination-card:hover{border-color:#baa575}.reference-book:hover,.volume:hover{transform:translateY(-3px)}
body{position:relative;isolation:isolate;background-color:var(--color-bg)}body:before{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 8% 30%,#a68c3c0c,transparent 38%),radial-gradient(ellipse at 95% 65%,#405d8422,transparent 45%),url('../img/decoracao/fundo-ornamental.webp') center top / cover no-repeat;opacity:.7}.background-note{display:block;padding:10px 4.3%;font:12px/1.5 Georgia,serif;color:var(--color-text-muted);border-top:1px solid var(--color-divider)}.background-note code{font-size:11px;overflow-wrap:anywhere}.world-story{max-width:76ch}.world-story h2{margin-bottom:16px;font-size:30px}.world-story p+p{margin-top:18px}
@media(prefers-reduced-motion:reduce){.btn,.icon-btn,.destination-card,.reference-book,.volume{transition:none!important;transform:none!important}}

/* Ficha: superfícies específicas de cada tema, sem azul escuro no modo claro. */
html[data-theme='light'] body .attr-box,html[data-theme='light'] body .attr-grid .attr-box{background:#f7f9fa;border-color:#bac7ce;color:#253642}
html[data-theme='light'] body .attr-box input,html[data-theme='light'] body .attr-grid input[type=number]{background:#fff;color:#243440;border:1px solid #a8bac5;box-shadow:inset 0 1px 3px #263d4d0a}
html[data-theme='light'] body .attr-points{background:linear-gradient(120deg,#e7eef2,#f3f6f8);color:#253642;border:1px solid #c3cfd6}html[data-theme='light'] body .attr-points strong{color:#253642}html[data-theme='light'] body .attr-box label{color:#354956}
/* Sumário em coluna reservada, nunca flutuando sobre o livro. */
.book-page main.content{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:36px;padding:40px 40px 64px;max-width:1440px;align-items:start}
.book-body{min-width:0;display:flex;flex-direction:column;gap:36px}.book-body>*{min-width:0;max-width:100%}.book-sidebar{grid-column:2;grid-row:1;position:sticky;top:24px;min-width:0;align-self:start}
.book-sidebar .reading-toc{position:static;inset:auto;width:auto;max-height:calc(100dvh - 60px);overflow:auto;margin:0;padding:16px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-surface);order:initial}.reading-toc summary{font-size:14px;font-weight:700;color:var(--color-primary);cursor:pointer;padding:4px 0}.reading-toc #reading-links{display:block}.reading-toc #reading-links a{display:block;padding:9px 0;overflow-wrap:anywhere;font-size:14px}.book-body .entry-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}.book-body .mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.book-body .entry-card,.book-body .mini-card{min-width:0}.book-body table{max-width:100%}.book-body .table-wrap{max-width:100%;overflow-x:auto}.mini-card>.img-slot+h4,.mini-card>img+h4,.mini-card>figure+h4{margin-top:18px;margin-bottom:6px;line-height:1.35}.entry-card .entry-head{padding-top:16px}
.world-kingdoms{display:grid;gap:30px}.world-kingdom{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);border:1px solid var(--color-border);border-radius:14px;background:var(--color-surface);overflow:hidden;align-items:start}.world-kingdom>img{width:100%;aspect-ratio:4/3;object-fit:cover}.world-kingdom-body{padding:26px;min-width:0}.world-kingdom-body h3{font-size:28px;margin:10px 0 16px}.world-kingdom-body p{color:var(--color-text-muted);font-size:16px;line-height:1.7}.world-kingdom details{margin-top:20px;border-top:1px solid var(--color-border);padding-top:16px}.world-kingdom summary{cursor:pointer;color:var(--color-primary);font-weight:600}.world-kingdom details section{padding-top:20px}.world-kingdom details h4{font-size:20px;margin-bottom:10px}.intro-form{display:grid;gap:18px;max-width:720px;margin-top:24px}.intro-form label{display:grid;gap:8px}.intro-form input,.intro-form select,.intro-form textarea,#intro-text{width:100%;padding:12px;border:1px solid var(--color-border);border-radius:6px;background:var(--color-surface);color:var(--color-text);font:inherit}.intro-form button{justify-self:start}#intro-result{margin-top:26px;max-width:720px}#intro-result label{display:block;margin-bottom:8px}#intro-result button{margin-top:14px}.conversation-prompt{font-size:23px!important;padding:20px 0;color:var(--color-text)!important}.community-steps ul{padding-left:24px;margin-top:18px}.community-steps li+li{margin-top:10px}
@media(max-width:1100px){.book-page main.content{display:flex;flex-direction:column;padding:28px 24px 48px;gap:24px}.book-sidebar{position:static;order:-1;width:100%}.book-sidebar .reading-toc{max-height:none}.book-body{width:100%}.world-kingdom{grid-template-columns:1fr}.world-kingdom>img{max-height:300px;aspect-ratio:16/9}}
@media(max-width:600px){.book-body .mini-grid{grid-template-columns:1fr}.book-page main.content{padding-inline:16px}.book-body{gap:26px}.world-kingdom-body{padding:20px}.intro-form button{justify-self:stretch}}
@media print{.book-sidebar{display:none}.book-page main.content{display:block;padding:0}}

html:root[data-theme="light"] body .attr-grid .attr-box{background:#f6f8fa!important;color:#253642!important}html:root[data-theme="light"] body .attr-grid input[type="number"]{background:#fff!important;color:#253642!important;border-color:#b0c1cc!important}html:root[data-theme="light"] body #attr-points{background:#eaf0f3!important;color:#253642!important}html:root[data-theme="light"] body #attr-points strong{color:#253642!important}
.tavern-conversation{text-align:center}.tavern-conversation .conversation-prompt{margin:18px auto 20px;padding:0;max-width:700px}.tavern-conversation #next-prompt{display:inline-flex;margin:0 auto 22px}.tavern-conversation p.muted{margin:0 auto}.myth-section{max-width:78ch;margin-inline:0 auto;width:100%;text-align:left}.myth-section h2{font-size:32px;margin-bottom:18px}.myth-section p{font-size:18px;line-height:1.85;margin-bottom:18px}.myth-question{font-size:24px!important;font-style:italic;color:var(--color-primary);border-left:2px solid var(--color-primary);padding-left:22px}.board-toolbar{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.board-toolbar select{padding:10px;border:1px solid var(--color-border);border-radius:6px}.board-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:22px}.board-card,.board-empty{padding:24px;border:1px solid var(--color-border);border-radius:12px;background:var(--color-surface)}.board-card h3{margin-bottom:14px}.board-card p{margin-bottom:10px}.board-empty{color:var(--color-text-muted)}.board-form{display:grid;gap:16px;max-width:720px}.board-form label{display:grid;gap:6px}.board-form input,.board-form select,.board-form textarea{padding:12px;border:1px solid var(--color-border);border-radius:6px;font:inherit;background:var(--color-surface);color:var(--color-text)}#notice-output{width:100%;margin-block:18px;padding:16px;font:inherit;background:var(--color-surface);color:var(--color-text)}

.creator-frame{margin:0;width:100%;border:2px solid #b39a61;border-radius:18px;overflow:hidden;box-shadow:0 10px 28px #02081335}.creator-frame img{display:block;width:100%;height:auto}.board-toolbar{margin-bottom:24px}

/* Contraste nas superfícies que permanecem escuras no tema claro. */
html:root[data-theme='light'] :is(.art-slot,.reference-hero,.reference-quick,.volume-cover,.hero-inner){--color-text:#fff;--color-text-muted:#fff;--color-text-faint:#fff;color:#fff}
html:root[data-theme='light'] :is(.art-label,.art-label code,.reference-quick span,.reference-quick small,.hero-footnote,.hero-side-note,.campaign-note){color:#fff}
html:root[data-theme='light'] .btn-secondary{background:#17263a;color:#fff}
html:root[data-theme='light'] :is(.hero-inner,.volume-cover) :is(h1,h2,h3,h4,p,span){color:#fff}
html:root[data-theme='light'] .reference-hero :is(h1,p,.eyebrow){color:#fff}
html:root[data-theme='light']{--color-surface-offset-2:#d1dce2;--color-surface-dynamic:#d1dce2}
.volume>h3{font-size:24px;line-height:1.3;margin:14px 0 8px}.sharing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.reference-players{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-player .player-copy h3,.reference-player .player-copy p{white-space:normal}.reference-player .player-copy{min-width:0}.request-consent{display:flex!important;align-items:flex-start;gap:12px!important;font-size:15px}.request-consent input{width:18px;min-width:18px;margin-top:6px}.board-form button:disabled{opacity:.6;cursor:not-allowed;transform:none}.request-success{padding:24px;border:1px solid var(--color-primary);border-radius:12px}.request-success p{margin:16px 0 24px}.reference-footer{height:auto;min-height:104px;gap:26px;padding-block:24px;flex-wrap:wrap}.footer-brand{display:flex;align-items:center;gap:12px}.footer-star{width:36px;height:36px;color:var(--color-primary);flex-shrink:0}.reference-footer .footer-brand strong{display:block;font:600 25px/1.2 Georgia,serif;color:var(--color-text)}.reference-footer .footer-brand small{display:block;font:11px/1.8 Georgia,serif;letter-spacing:.17em;text-transform:uppercase;color:var(--color-text-muted)}.footer-socials{display:flex;align-items:center;flex-wrap:wrap;gap:22px;margin-left:auto}.footer-socials>a,.footer-socials>span{display:flex;align-items:center;gap:7px;font:600 14px/1.4 Georgia,serif;color:var(--color-text)}.footer-socials svg{width:18px;height:18px;color:var(--color-primary)}.footer-socials small{display:block;font-size:10px;font-weight:400;color:var(--color-text-muted)}.footer-socials a:hover{color:var(--color-primary)}[hidden]{display:none!important}
@media(max-width:700px){.reference-players,.sharing-grid{grid-template-columns:1fr}.footer-socials{margin:0;gap:18px;width:100%;order:3}.reference-player{min-height:190px;height:auto}.reference-player .player-art{min-height:190px}.reference-footer .footer-settings{margin-left:auto}}

/* Texto acompanha a largura útil dos quadros e da imagem do Criador. */
.myth-section{max-width:none;width:100%;margin-inline:0}.myth-section p{max-width:none;font-size:clamp(18px,1.35vw,21px);line-height:1.8}
.content :is(.page-head,.community-welcome,.community-steps,.destination-card,.board-card,.board-empty,.chronicle-card,.chronicle-secret,.entry-card,.mini-card,.master-chapter,.master-tool-card,.master-pillar,.card,.subcard) :is(p,li){max-width:none}
.community-welcome>p,.community-steps>p{max-width:none}.community-welcome p,.community-steps p,.community-steps li,.destination-card p,.board-card p,.board-empty{font-size:clamp(17px,1.25vw,20px);line-height:1.75}.community-steps h2{margin-bottom:18px}.community-steps p+p{margin-top:18px}
.reference-footer .footer-quote{flex:1 1 220px;margin:0;text-align:center;font:italic 17px/1.6 Georgia,serif;color:var(--color-primary);max-width:none}.footer-socials{margin-left:0}
@media(max-width:1100px){.reference-footer .footer-quote{order:3;flex-basis:100%}.footer-socials{margin-left:auto}}
@media(max-width:700px){.footer-socials{margin-left:0;order:4}.reference-footer .footer-quote{font-size:16px}.community-steps,.community-welcome{padding:22px}.myth-section p{font-size:18px}}

/* Retratos do Hall: a obra inteira aparece sem ampliar ou cortar o personagem. */
.reference-player .player-art{display:grid;place-items:center;background:linear-gradient(145deg,#172b38,#0c1822)}
.reference-player .player-art>img{position:static;display:block;width:100%;height:100%;object-fit:contain;object-position:center;background:#0c1822}

/* Refinamento dos quadros e controles permanentes de leitura. */
.reference-footer{min-height:64px;height:auto;padding-block:12px;gap:18px}
.reference-footer .footer-brand strong{font-size:22px}.footer-star{object-fit:contain;width:36px;height:36px}
.footer-settings{position:fixed!important;right:16px;bottom:16px;z-index:300;margin:0!important}
.footer-settings>summary{display:flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid var(--color-primary);border-radius:24px;background:var(--color-surface);color:var(--color-text);box-shadow:0 4px 18px #0004;font-weight:600;font-size:14px}
.footer-settings .topbar-actions{bottom:54px;right:0;border-radius:14px;gap:12px}
.footer-settings .music-panel{top:auto;bottom:58px;max-height:65dvh;overflow-y:auto}
body{padding-bottom:74px}
.chronicle-card,.chronicle-secret,.chronicle-gate,.lede-note,.master-callout,.master-block{border-radius:18px}
.lede-note{margin-bottom:24px}.chronicles-banner{margin-bottom:24px}
#cronicas-gate{width:100%;max-width:none;text-align:left;padding:32px;margin-inline:0}
#cronicas-gate p{max-width:none;line-height:1.75}#cronicas-gate h2{margin-bottom:18px}
.master-login{display:grid;grid-template-columns:1fr;gap:10px;max-width:560px;margin-block:24px}
.master-login input{width:100%;padding:12px;border-radius:8px;border:1px solid var(--color-border);background:var(--color-surface);color:var(--color-text);font:inherit}
.master-login button{justify-self:start}#master-logout{margin-bottom:24px}
.board-empty{width:100%;max-width:none!important;grid-column:1/-1;margin:0}.board-grid{width:100%}
.reference-player{height:auto;min-height:300px;align-items:stretch}.reference-player .player-art{height:auto;min-height:300px;width:43%}
.reference-player .player-art>img{height:100%;object-fit:cover;object-position:center top}
.reference-player .player-copy{padding:22px 20px 130px;flex:1}.reference-player .player-copy h3{font-size:20px}.reference-player .player-copy p{font-size:15px;line-height:1.65}
.reference-player .player-badge{width:102px;height:120px;right:20px;bottom:12px;background:transparent!important;border:0;box-shadow:none}
.reference-player .player-badge>img{background:transparent!important;object-fit:contain}
@media(max-width:700px){.reference-footer{padding-block:12px}.reference-player .player-copy{padding:18px 14px 125px}.reference-player .player-copy h3{font-size:18px}.reference-player .player-art{width:40%}.footer-settings{bottom:12px;right:12px}#cronicas-gate{padding:22px}.reference-player .player-badge{right:14px}}
@media print{.footer-settings{display:none!important}body{padding-bottom:0}}

/* Quadros compactos e acabamento do player. */
body{padding-bottom:0;min-height:100dvh;display:flex;flex-direction:column}
body>main{flex:1}body>.reference-footer{margin-top:auto}
.reference-footer{padding-block:10px;min-height:60px}
.reference-player{min-height:280px;height:auto;background:radial-gradient(ellipse at 100% 100%,#3d596d88,transparent 72%),linear-gradient(125deg,#243b50 0%,#172b40 48%,#0d182b 100%)}
html:root[data-theme='light'] .reference-player{background:radial-gradient(ellipse at 100% 100%,#afc3d5a0,transparent 70%),linear-gradient(125deg,#f5f8fa 0%,#e1eaf1 48%,#c8d6e2 100%)}
.reference-player .player-art{position:relative;min-height:280px;height:auto;width:40%}
.reference-player .player-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 20%}
.reference-player .player-copy{padding:22px 22px 105px}
.reference-player .player-badge{width:86px;height:100px;bottom:4px;right:18px}
.footer-settings>summary{width:54px;height:42px;justify-content:center;padding:0;font-size:19px;border-radius:14px;letter-spacing:2px}
.footer-settings>summary>span{display:none}
.footer-settings .topbar-actions{padding:6px;gap:4px;border-radius:14px;bottom:50px;box-shadow:0 6px 18px #0003}
.footer-settings .topbar-actions>.icon-btn,.footer-settings .music-toggle{width:36px;height:36px;min-height:36px;padding:8px;border:0;border-radius:10px;background:transparent}
.footer-settings .music-panel{width:min(280px,calc(100vw - 32px));padding:16px;border-radius:18px;border-color:color-mix(in srgb,var(--color-primary) 45%,transparent);background:linear-gradient(145deg,var(--color-surface-2),var(--color-surface));box-shadow:0 14px 38px #0005;backdrop-filter:none;bottom:48px}
.music-panel__head{margin-bottom:12px;align-items:center}.music-panel__head .eyebrow{display:none}.music-panel__head strong{font-size:14px;letter-spacing:.02em}
.music-panel .music-close{width:26px;height:26px;border:0;font-size:20px}
.music-panel .music-now{min-height:0;margin-bottom:10px}.music-panel .music-now__title{font-size:13px;line-height:1.5}.music-panel .music-now__artist{font-size:11px;line-height:1.5}
.music-panel .music-track-select{padding:7px 26px 7px 9px;font-size:12px;border-radius:8px;margin-bottom:10px}
.music-panel .music-controls{gap:16px;margin:2px 0 10px}.music-panel .music-btn{width:32px;height:32px;border:0;background:transparent}.music-panel .music-play{width:38px;height:38px;border-radius:50%;background:var(--color-primary);color:var(--color-bg)}
.music-panel input[type='range']{appearance:none;-webkit-appearance:none;height:3px;border:0;border-radius:4px;background:var(--color-border);padding:0}
.music-panel input[type='range']::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:11px;height:11px;border-radius:50%;background:var(--color-primary);border:0}
.music-panel input[type='range']::-moz-range-thumb{width:11px;height:11px;border-radius:50%;background:var(--color-primary);border:0}
.music-panel .music-time{font-size:10px;margin:6px 0 10px}.music-panel .music-volume-row{gap:10px;font-size:11px}
.footer-settings :is(button,summary,input,select):focus-visible{outline:2px solid var(--color-primary);outline-offset:3px}
@media(max-width:700px){.reference-player .player-copy{padding:18px 16px 100px}.reference-player .player-copy p{font-size:14px}.reference-player .player-art{width:36%;min-height:270px}.reference-footer{padding-right:78px}.footer-settings>summary{width:48px;height:40px}}

/* Painel de ambiente: selo, trilha e controles em uma única composição. */
.footer-settings>summary{width:44px;height:44px;border-radius:50%;background:linear-gradient(145deg,var(--color-surface-2),var(--color-surface));box-shadow:0 5px 20px #0004;transition:transform .2s,border-color .2s}
.footer-settings>summary svg{width:20px;height:20px}.footer-settings[open]>summary{border-color:var(--color-primary);transform:rotate(90deg)}
.footer-settings .topbar-actions{border-radius:24px;padding:6px 8px;bottom:54px;gap:8px;border-color:color-mix(in srgb,var(--color-primary) 45%,transparent)}
.footer-settings .music-panel{width:min(292px,calc(100vw - 32px));padding:18px 20px 16px;bottom:54px;border-radius:22px;background:radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--color-primary) 15%,transparent),transparent 60%),linear-gradient(150deg,var(--color-surface-2),var(--color-surface));box-shadow:0 20px 50px #0006,inset 0 1px 0 #ffffff15}
.music-panel .music-panel__head{margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid color-mix(in srgb,var(--color-primary) 24%,transparent)}
.music-panel .music-panel__head strong{font-size:13px;letter-spacing:.06em;color:var(--color-primary)}
.music-emblem{height:52px;display:flex;align-items:center;justify-content:center;gap:4px;margin-bottom:10px}
.music-emblem img{width:42px;height:42px;object-fit:contain;margin-right:10px}
.music-emblem span{width:3px;height:10px;border-radius:3px;background:var(--color-primary);opacity:.65;transform-origin:center}
.music-emblem span:nth-of-type(2),.music-emblem span:nth-of-type(4){height:18px}.music-emblem span:nth-of-type(3){height:26px}
.music-panel.is-playing .music-emblem span{animation:valedria-sound 1s ease-in-out infinite alternate}.music-panel.is-playing .music-emblem span:nth-of-type(even){animation-delay:-.5s}
.music-panel .music-now{text-align:center;margin-bottom:12px}.music-panel .music-now__title{font-size:14px;white-space:normal;line-height:1.4}.music-panel .music-now__artist{font-size:11px;margin-top:3px;opacity:.8}
.music-panel .music-track-select{font-size:11px;border:0;border-bottom:1px solid var(--color-border);border-radius:0;background:transparent;padding:7px 20px 7px 0;margin-bottom:10px}
.music-panel .music-controls{gap:23px;margin:4px 0 16px}.music-panel .music-play{width:42px;height:42px;background:linear-gradient(145deg,#e1cc91,#b49754);color:#152033;box-shadow:0 0 0 4px color-mix(in srgb,var(--color-primary) 12%,transparent)}
.music-panel input[type='range']{background:linear-gradient(to right,var(--color-primary) var(--fill,0%),var(--color-border) var(--fill,0%))}
.music-panel .music-volume-row{padding-top:10px;border-top:1px solid color-mix(in srgb,var(--color-primary) 18%,transparent);font-size:10px;letter-spacing:.04em}.music-panel .music-volume{max-width:140px;margin-left:auto}
@keyframes valedria-sound{from{transform:scaleY(.5)}to{transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){.music-panel.is-playing .music-emblem span{animation:none}.footer-settings>summary{transition:none}}

/* Tapeçaria própria para o tema claro em todas as páginas. */
html:root[data-theme='light'] body{background-color:#f3f0e8}
html:root[data-theme='light'] body::before{
  background:url('../img/decoracao/fundo-ornamental-claro.webp') center top / cover no-repeat;
  filter:none;
  opacity:.32;
  mix-blend-mode:normal;
}

/* Marfim e dourado: paisagem e heróis no tema claro. */
html:root[data-theme='light'] .reference-player{background:radial-gradient(ellipse at 100% 100%,#d8c7a57a,transparent 72%),linear-gradient(125deg,#fffefa 0%,#f5efe2 48%,#e7dbc4 100%)}
html:root[data-theme='light'] .reference-hero,html:root[data-theme='light'] .hero-art-slot{background:#f7f3eb}
html:root[data-theme='light'] .hero-art-slot.art-ready:after{background:linear-gradient(90deg,#f7f3ebee 0%,#f7f3ebc9 27%,#f7f3eb30 60%,transparent 100%)}
html:root[data-theme='light'] .reference-hero :is(h1,p,.eyebrow){color:#34342e}
html:root[data-theme='light'] .reference-hero .eyebrow{color:#806735}
html:root[data-theme='light'] .reference-hero .hero-footnote{color:#645b4b}
html:root[data-theme='light'] .hero-side-note{color:#39362e;text-shadow:0 1px 5px #fff}
html:root[data-theme='light'] .reference-hero .btn-secondary{background:#f8f3e8;color:#443b2c;border-color:#a68a50}

/* Paleta clara unificada: marfim, pergaminho e ouro. */
html:root[data-theme='light']{
 --color-bg:#f7f3ea;--color-surface:#faf7f0;--color-surface-2:#fffdf8;
 --color-surface-offset:#eee5d5;--color-surface-offset-2:#e4d8c2;--color-surface-dynamic:#e4d8c2;
 --color-text:#342f27;--color-text-muted:#625746;--color-text-faint:#716451;
 --color-border:#cbbd9f;--color-divider:#d9ccb4;--color-primary-highlight:#eee3cd;
}
html:root[data-theme='light'] :is(.reference-header,.reference-footer){background:linear-gradient(120deg,#fffdf8,#f0e8d9);border-color:#d2c09b}
html:root[data-theme='light'] .btn-secondary{background:linear-gradient(135deg,#faf4e7,#e7d8b9);color:#403523;border-color:#b39a61}
html:root[data-theme='light'] body .attr-grid .attr-box{background:#f5eedf!important;color:#342f27!important}
html:root[data-theme='light'] body .attr-grid input[type='number']{background:#fffdf8!important;color:#342f27!important;border-color:#cbbd9f!important}
html:root[data-theme='light'] body #attr-points{background:linear-gradient(120deg,#f4ebda,#e9dbc0)!important;color:#342f27!important}
html:root[data-theme='light'] body #attr-points strong{color:#342f27!important}
html:root[data-theme='light'] :is(.sheet-form-card>.card,.sheet-preview .card,.sheet-preview .mini-card){background:linear-gradient(135deg,#fffdf9,#f1e8d8);color:#342f27;border-color:#cbbd9f}
.sheet-form-card>.card,.sheet-preview .card,.sheet-preview .mini-card{border-radius:18px}
.sheet-layout .sheet-form-card{background:transparent;border:0;box-shadow:none;border-radius:0}
.sheet-layout .attr-points{border-radius:10px;margin-top:12px}
.sheet-layout .sheet-actions .btn{border-radius:10px}
.sheet-layout :is(.attr-box,.readonly-pill,.preview-attrs>*,.preview-list,.field input,.field select,.field textarea){border-radius:10px}
html:root[data-theme='light'] .sheet-layout :is(.readonly-pill,.preview-list,.preview-attrs>*){background:#eee4d2;color:#443928;border-color:#cfbf9e}
html:root[data-theme='light'] .sheet-layout :is(input,select,textarea){background:#fffdf8;color:#342f27;border-color:#cbbd9f}
html:root[data-theme='light'] .reference-hero :is(h1,p){color:#29261f}
html:root[data-theme='light'] .reference-hero .hero-side-note{color:#342b1d;background:#fff9e9ed;border:1px solid #c8ad75;border-radius:10px;padding:12px 14px;max-width:190px;font-weight:700;line-height:1.6;text-shadow:none;box-shadow:0 3px 12px #44351b15}
html:root[data-theme='light'] .reference-hero .hero-footnote{color:#51432e;font-weight:600}

/* Acabamento claro consistente para os espaços de encontro. */
html:root[data-theme='light'] :is(.board-empty,.board-card,.community-welcome,.community-steps,.destination-card){background:linear-gradient(135deg,#fffdf9,#f1e8d8);border-color:#cbbd9f}
html:root[data-theme='light'] .reference-hero .hero-side-note{background:transparent;border:0;border-radius:0;box-shadow:none;padding:0;color:#241c10;text-shadow:0 1px 2px #fff,0 0 5px #fff,0 0 10px #fff;font-weight:700}

/* Geografia: localidades legíveis em cartões em qualquer largura. */
.locality-heading{margin-top:28px;margin-bottom:16px}
.book-body .locality-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:20px;align-items:start}
.locality-card{min-width:0;border-radius:14px;overflow-wrap:anywhere}
.locality-card h4{line-height:1.4;margin-bottom:10px}.locality-card .img-slot+h4{margin-top:18px}
.locality-card p+p{margin-top:10px}.locality-card .img-slot{width:100%;max-width:100%}
@media(max-width:600px){.book-body .locality-grid{grid-template-columns:minmax(0,1fr)}.locality-card{padding:16px}}

/* Um único padrão de território e cartões em toda a Geografia. */
.geography-page .entry-card{border-radius:22px}
.geography-page .subcard{border-radius:16px}
.geography-page .geography-travel-note{margin-bottom:20px}
.geography-page .subcard p+p{margin-top:10px}
.geography-page .entry-grid-wide{display:grid;grid-template-columns:minmax(0,1fr);gap:32px}
.geography-page .subcard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch}
.geography-page .subcard-grid>.subcard{min-width:0;margin:0;padding:16px;overflow-wrap:break-word}
.geography-page .subcard-grid h4{line-height:1.4}.geography-page figcaption{margin-top:16px;font-weight:600}
@media(max-width:1100px){.geography-page .subcard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.geography-page .subcard-grid{grid-template-columns:minmax(0,1fr)}}

.music-panel .music-now__artist{display:block;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.music-now__artist a{text-decoration:underline;color:inherit}
