/* hotfix2: superfícies claras sempre com texto escuro (o tema escuro trocava --text para creme) */
@layer priority{
:root{--kz-ink:#1f1a14!important}
:root[data-theme=dark] .j3 .j3-chapter,
:root[data-theme=dark] .j3 .j3-enc,
:root[data-theme=dark] .j3 .j3-enc .j3-type,
:root[data-theme=dark] .j3 .j3-gym,
:root[data-theme=dark] .j3 .j3-invite,
:root[data-theme=dark] .j3 .j3-slot,
:root[data-theme=dark] .j3 .j3-slot-type,
:root[data-theme=dark] .vc-crate-icon,
:root[data-theme=dark] dialog#modal .modal-top>button,
:root[data-theme=dark] dialog#modal:not(.pokemon-sheet):not(.garden-picker):not(.trainer-sheet-dialog),
:root[data-theme=dark] dialog.pokemon-sheet .pk-attributes>.pk-attr,
:root[data-theme=dark] dialog.pokemon-sheet .pk-card,
:root[data-theme=dark] dialog.pokemon-sheet .pk-move,
:root[data-theme=dark] dialog.pokemon-sheet .pk-popover .kz-row:not(:disabled):hover,
:root[data-theme=dark] dialog.pokemon-sheet .pk-popover:not(:has(.asc2))>section,
:root[data-theme=dark] dialog.pokemon-sheet .pk-popover>section>header button,
:root[data-theme=dark] dialog.pokemon-sheet .pk-tabs{--text:#1f1a14!important;--text-soft:#5a4d3a!important;--game-ink:#1f1a14!important;--kz-ink:#1f1a14!important;--kz-ink-soft:#5a4d3a!important;--muted:#5a4d3a!important;color:#1f1a14!important}
}
/* tema claro: tokens com contraste >= 4.5:1 para texto branco em botões e texto secundário */
@layer priority{
:root[data-theme=normal]{--kz-red:#C0392B!important;--kz-ink-soft:#5a4d3a!important;--text-soft:#5a4d3a!important;--muted:#5a4d3a!important}
:root[data-theme=normal] .nav-badge{background:#C0392B!important}
:root[data-theme=normal] dialog.pokemon-sheet .pk-attributes button[data-sheet=allocate]:not(:disabled){background:#4f6f43!important}
:root[data-theme=dark] dialog.pokemon-sheet :is(.pk-legend,.pk-empty-list){color:var(--text-soft)!important}
}
@layer priority{
/* dentro do popover claro, os botões/linhas continuam escuros no tema escuro: devolve o texto claro */
:root[data-theme=dark] dialog.pokemon-sheet .pk-popover:not(:has(.asc2))>section>:not(header) :is(button,.kz-row){--text:#f7ebd3!important;--text-soft:#c6cfb5!important;--kz-ink:#f7ebd3!important;--kz-ink-soft:#c6cfb5!important;--muted:#c6cfb5!important;color:#f7ebd3!important}
/* tema claro: botão +1 de EV com verde mais escuro para o texto branco (4.7:1) */
:root[data-theme=normal] dialog.pokemon-sheet .pk-combat-stat button[data-sheet=ev]:not(:disabled){background:#1E8449!important}
}
@layer priority{
:root[data-theme=normal] .journey-drop-content{color:#1f1a14!important;--text:#1f1a14!important;--text-soft:#5a4d3a!important}
:root[data-theme=normal] .journey-drop-content :is(b,strong,span,small,p){color:inherit!important}
:root[data-theme=normal] .journey-drop-content small{color:#5a4d3a!important}
.j3 .j3-chapter>summary>i,.j3 .j3-chapter.is-cleared>summary>i{color:#1a6b3c!important}
}
@layer priority{
/* moldura do avatar: o tamanho fixo de 36px do redesign deslocava a moldura para o canto; volta a cobrir a foto inteira e centralizada */
html body .shell .main .game-header.hud-wood.hud-wood .hud-photo{position:relative!important;transform:none!important;rotate:none!important;padding:0!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-photo>img.hud-frame-art{position:absolute!important;inset:0!important;left:0!important;top:0!important;width:100%!important;height:100%!important;margin:0!important;transform:none!important;rotate:none!important;object-fit:contain!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-photo:has(>.hud-frame-art)>img:not(.hud-frame-art){position:absolute!important;left:var(--hud-avatar-left)!important;top:var(--hud-avatar-top)!important;width:var(--hud-avatar-w)!important;height:var(--hud-avatar-h)!important;margin:0!important;transform:none!important;rotate:none!important}
html body .shell .main .game-header.hud-wood.hud-wood .hud-photo:not(:has(>.hud-frame-art))>img{width:36px!important;height:36px!important}
}
@layer priority{:root[data-theme=dark] dialog.pokemon-sheet .pk-popover:not(:has(.asc2))>section>button:disabled{color:#f7ebd3!important}}
