/* JereChess 2.1 — Puzzles: superficies, controles y resumen adaptados a los ocho temas.
   NO reestilizar .board, .square, .piece, coordenadas, colores de casillas ni indicaciones funcionales. */
html[data-jc-theme] body[data-jc-theme-module="puzzles"]{
 --p-bg:var(--jc21-theme-bg);--p-fg:var(--jc21-theme-text);--p-accent:var(--jc21-theme-accent);
 --p-border:var(--jc21-theme-accent);--p-action-ink:var(--jc21-action-text,var(--p-bg));
 --jc-page:var(--p-bg);--jc-text:var(--p-fg);--jc-muted:var(--p-fg);
 --jc-panel:var(--p-bg);--jc-panel-alt:var(--p-bg);--jc-surface:var(--p-bg);
 --jc-control:var(--p-bg);--jc-control-hover:var(--p-bg);--jc-border:var(--p-accent);
 --jc-border-strong:var(--p-accent);--jc-input:var(--p-bg);--jc-font:Montserrat,Arial,sans-serif;
 background:var(--p-bg)!important;color:var(--p-fg)!important;
 font-family:Montserrat,Arial,sans-serif!important;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(.shell,.panel,.board-panel,.settings,.stats>div,.extra-stats>div,.summary-modal,.summary-mascot,.summary-stat,.summary-results,.review-item,.puzzle-replay-dialog,.promo,.modal-promo){
 background:var(--p-bg)!important;color:var(--p-fg)!important;
 border-color:var(--p-border)!important;box-shadow:none!important;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(.board-header,.board-header strong,.board-header #rating,.feedback,label,.stats span,.extra-stats span,.summary-reason,.summary-stat span,.small,.review-item summary,.review-item p,.puzzle-replay-status,.puzzle-replay-move,.summary-modal h3,.summary-stat strong,.summary-title,.modal-actions,.puzzle-replay-dialog h3){
 color:var(--p-fg)!important;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(.stats>div,.extra-stats>div,.summary-stat,.review-item,.summary-title){
 border-color:var(--p-border)!important;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(button:not(.square):not(.puzzle-replay-square):not(.jere-tab):not(.jc-signout):not(.jere-explore-trigger):not(.jc-mobile-toggle):not(.jc21-theme-choice):not(.jc21-theme-trigger):not(.jere-entry-btn):not(.jere-close),select){
 background:var(--p-bg)!important;color:var(--p-accent)!important;
 border:1px solid var(--p-accent)!important;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(button:not(.square):not(.jere-tab):not(.jc-signout):not(.jc-mobile-toggle):not(.jc21-theme-choice):not(.jc21-theme-trigger):not(.jere-entry-btn):not(.jere-close):not(:disabled):hover,button:not(.square):not(.jere-tab):not(.jc-signout):not(.jc-mobile-toggle):not(.jc21-theme-choice):not(.jc21-theme-trigger):not(.jere-entry-btn):not(.jere-close):focus-visible){
 background:var(--p-accent)!important;color:var(--p-action-ink)!important;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] select{color:var(--p-fg)!important;background:var(--p-bg)!important;accent-color:var(--p-accent)}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(.feedback,.summary-title,.summary-layout,.summary-stat-grid,.modal-actions,.summary-solution,.mascot-speech){border-color:var(--p-border)!important;}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] .mascot-speech{
 background:var(--p-accent)!important;color:var(--p-fg)!important;border:1px solid var(--p-accent)!important;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] .summary-stat strong{color:var(--p-fg)!important}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] .summary-cap{color:var(--p-accent)!important}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(.board-panel,.summary-modal,.puzzle-replay-dialog){border-radius:18px!important}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] :is(.summary-modal,.puzzle-replay-dialog,.panel){border-width:1px!important}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] .jc21-theme-trigger{background:var(--p-bg)!important;color:var(--p-fg)!important;border-color:var(--p-accent)!important}
html[data-jc-theme] body[data-jc-theme-module="puzzles"] .jc21-theme-trigger:hover{color:var(--p-accent)!important}
/* Mantener el tablero y los juegos independientes del tema de la interfaz. */

/* Correccion definitiva del fondo inferior: el elemento html heredaba el azul
   de jerechess-theme-adapter.css, mientras body adoptaba el tema.
   Ambos deben usar el MISMO fondo y ocupar al menos toda la ventana. */
html[data-jc-theme]{
  background:var(--jc21-theme-bg)!important;
  background-color:var(--jc21-theme-bg)!important;
  min-height:100%;
}
html[data-jc-theme] body[data-jc-theme-module="puzzles"]{
  background:var(--jc21-theme-bg)!important;
  background-color:var(--jc21-theme-bg)!important;
  min-height:100vh;
}
