/* JereChess 2.1 · Sistema de identidad compartido. Fuente de verdad: Inicio aprobado.
 * Portada se conserva sin modificaciones. Nuevos módulos incluyen este CSS después
 * de sus CSS funcionales. Ninguna regla afecta tableros, motores ni formularios.
 */
html[data-jc-theme] body[data-jc-theme-module="jugar"]{
  --jc-identity-bg:var(--jc21-theme-bg,#080808);
  --jc-identity-text:var(--jc21-theme-text,#fff);
  --jc-identity-accent:var(--jc21-theme-accent,#e32936);
  --jc-identity-surface:var(--jc21-theme-surface,#111);
  --jc-identity-inset:var(--jc21-theme-inset,#171717);
  --jc-identity-outline:var(--jc21-theme-outline,#a02d3a);
}
/* Cabecera: dimensiones, componentes e iconografía iguales a Inicio. */
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav.jere-site-nav{
  position:relative!important;top:auto!important;
  z-index:100!important;width:100%!important;
  background:var(--jc-identity-surface)!important;
  border-bottom:1px solid var(--jc-identity-outline)!important;
  box-shadow:none!important;
  font-family:Montserrat,Arial,sans-serif!important;
  backdrop-filter:none!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .nav-content{
  width:min(100%,1580px)!important;max-width:1580px!important;
  margin:0 auto!important;min-height:67px!important;
  display:grid!important;
  grid-template-columns:minmax(190px,1fr) auto minmax(135px,1fr)!important;
  align-items:center!important;gap:12px!important;
  padding:5px 22px!important;
  flex-wrap:nowrap!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .logo{
  display:flex!important;align-items:center!important;justify-self:start!important;
  gap:8px!important;margin:0!important;padding:0!important;
  text-decoration:none!important;position:relative!important;isolation:isolate!important;
  white-space:nowrap!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .brand-logo{
  width:49px!important;height:49px!important;object-fit:contain!important;
  filter:drop-shadow(0 0 8px color-mix(in srgb,var(--jc-identity-accent) 40%,transparent))!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .logo::before{
  content:""!important;position:absolute!important;z-index:-1!important;
  inset:0!important;width:100%!important;height:100%!important;filter:none!important;
  background:radial-gradient(ellipse at 34% 52%,color-mix(in srgb,var(--jc-identity-accent) 32%,transparent),transparent 76%)!important;
  pointer-events:none!important;
}
/* Marca invariable: Jere = texto/acento contorno; Chess = acento/texto contorno. */
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-wordmark{
  display:inline-flex!important;font-family:Montserrat,Arial,sans-serif!important;
  font-weight:800!important;font-size:clamp(20px,1.8vw,29px)!important;
  letter-spacing:-.045em!important;line-height:1!important;
  filter:none!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-wordmark .jere-name{
  color:var(--jc-identity-text)!important;
  -webkit-text-stroke:1.15px var(--jc-identity-accent)!important;
  paint-order:stroke fill!important;text-shadow:none!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-wordmark .chess-name{
  color:var(--jc-identity-accent)!important;
  -webkit-text-stroke:1.15px var(--jc-identity-text)!important;
  paint-order:stroke fill!important;text-shadow:none!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tabs{
  display:flex;position:static!important;justify-content:center!important;
  align-items:center!important;align-self:auto!important;
  gap:10px!important;margin:0!important;padding:0!important;
  min-width:0!important;flex-wrap:nowrap!important;overflow:visible!important;
  width:auto!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab{
  appearance:none!important;display:inline-flex!important;align-items:center!important;
  justify-content:center!important;position:static!important;top:auto!important;
  min-height:40px!important;line-height:1.15!important;
  padding:8px 13px!important;border:1px solid var(--jc-identity-outline)!important;
  border-radius:12px!important;
  background:var(--jc-identity-surface)!important;
  color:var(--jc-identity-text)!important;
  box-shadow:none!important;transform:none;
  font:650 13px/1.15 Montserrat,Arial,sans-serif!important;
  white-space:nowrap!important;text-decoration:none!important;
  transition:background-color .18s,border-color .18s,color .18s,transform .18s!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab:hover,
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab:focus-visible,
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab[aria-current="page"]{
  border-color:var(--jc-identity-accent)!important;
  background:var(--jc-identity-inset)!important;
  color:var(--jc-identity-accent)!important;
  box-shadow:0 0 0 1px var(--jc-identity-accent)!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab:hover{transform:translateY(-1px)!important}
/* El área de cuenta ocupa el mismo extremo derecho que en Inicio. */
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-area{
  justify-self:end!important;position:relative!important;
  display:flex!important;align-items:center!important;max-width:250px!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account{
  display:flex!important;align-items:center!important;gap:9px!important;
  max-width:240px!important;padding:4px 11px 4px 5px!important;
  border:1px solid var(--jc-identity-outline)!important;border-radius:50px!important;
  background:var(--jc-identity-surface)!important;color:var(--jc-identity-text)!important;
  font:650 12px Montserrat,Arial,sans-serif!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account:hover{
  border-color:var(--jc-identity-accent)!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-avatar{
  width:34px!important;height:34px!important;min-width:34px!important;
  border-radius:50%!important;border:1px solid var(--jc-identity-accent)!important;
}
/* Menú de cuenta: misma apariencia y mismo hover de fondo sólido que Inicio.
 * Reutiliza las mismas etiquetas, destinos y lógica de Firebase. */
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-menu,
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-explore-menu{
  position:absolute!important;top:100%!important;right:0!important;
  width:210px;padding:7px!important;
  background:var(--jc-identity-surface)!important;
  color:var(--jc-identity-text)!important;
  border:1px solid var(--jc-identity-outline)!important;
  border-radius:12px!important;
  box-shadow:0 15px 35px #0007!important;z-index:1400!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-explore-menu{
  top:calc(100% + 9px)!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-menu :is(a,button),
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-explore-menu a{
  display:block!important;width:100%!important;
  background:transparent!important;color:var(--jc-identity-text)!important;
  border:0!important;border-radius:7px!important;
  padding:10px 12px!important;text-align:left!important;
  font:600 13px Montserrat,Arial,sans-serif!important;
  text-decoration:none!important;cursor:pointer!important;
  transition:background-color .16s ease,color .16s ease!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-menu :is(a,button):is(:hover,:focus-visible),
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-explore-menu a:is(:hover,:focus-visible){
  background:var(--jc-identity-accent)!important;
  color:var(--jc-identity-bg)!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-menu .jc-signout{
  border-top:1px solid var(--jc-identity-outline)!important;
  border-radius:0!important;margin-top:4px!important;
}
@media(max-width:1100px){
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .nav-content{
   grid-template-columns:minmax(125px,1fr) auto minmax(125px,1fr)!important;
   padding:7px 12px!important;gap:7px!important;
 }
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tabs{gap:5px!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab{font-size:11px!important;padding:7px 8px!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-wordmark{font-size:21px!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .brand-logo{width:40px!important;height:40px!important}
}
@media(max-width:760px){
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .nav-content{
  grid-template-columns:1fr auto auto!important;grid-template-rows:auto!important;
  min-height:62px!important;gap:9px!important;padding:7px 12px!important;
 }
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .logo{grid-column:1!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-mobile-toggle{display:block!important;grid-column:2!important;grid-row:1!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-area{grid-column:3!important;grid-row:1!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account{max-width:43px!important;padding:3px!important;border:0!important;background:transparent!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-label{display:none!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tabs{
  display:none!important;position:absolute!important;top:100%!important;left:0!important;right:0!important;
  background:var(--jc-identity-surface)!important;border-bottom:1px solid var(--jc-identity-outline)!important;
  padding:12px!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;
  width:100%!important;z-index:1200!important;
 }
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tabs.jc-open{display:flex!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab{width:100%!important;min-height:42px!important;justify-content:flex-start!important;padding:12px!important;font-size:13px!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-explore{width:100%!important}
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-explore-menu{
   position:static!important;box-shadow:none!important;width:auto!important;margin:4px 0 0 10px!important;
 }
}
@media(prefers-reduced-motion:reduce){
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jere-tab,
 html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-global-nav .jc-account-menu :is(a,button){transition:none!important}
}

/* La palabra de marca sigue el estándar también fuera de la cabecera.
   Color de relleno y contorno recíprocos en las ocho opciones de tema. */
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-brand-mark{
  display:inline!important;
  font-family:Montserrat,Arial,sans-serif!important;
  font-weight:800!important;
  letter-spacing:-.045em!important;
  white-space:nowrap!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-brand-mark .jere-name{
  color:var(--jc-identity-text)!important;
  -webkit-text-stroke:1.15px var(--jc-identity-accent)!important;
  paint-order:stroke fill!important;
  text-shadow:none!important;
}
html[data-jc-theme] body[data-jc-theme-module="jugar"] .jc-brand-mark .chess-name{
  color:var(--jc-identity-accent)!important;
  -webkit-text-stroke:1.15px var(--jc-identity-text)!important;
  paint-order:stroke fill!important;
  text-shadow:none!important;
}
