/* ==========================================================================
   UNIFICAR LAS BOTONERAS DEL HÉROE
   Se carga la última: fija el TAMAÑO y la COLOCACIÓN de los botones,
   pero no los colores (cada tema pone los suyos).
   ========================================================================== */

/* el bloque de texto mide lo mismo en los tres temas */
.hero .wrap{max-width:660px !important}

/* grupo de botones: siempre en fila, con el mismo aire */
.hero .cta{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:12px !important;
  max-width:100% !important;
  margin-top:26px !important;
}
.hero .cta .btn{
  font-size:16.5px !important;
  padding:13px 18px !important;
  line-height:1.25 !important;
  border-radius:13px !important;
  white-space:nowrap !important;
  width:auto !important;
}

/* pastillas de confianza: mismo tamaño y misma rejilla */
.hero .trust{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  max-width:100% !important;
  margin-top:16px !important;
}
.hero .trust span{
  font-size:13.5px !important;
  padding:8px 13px !important;
  line-height:1.2 !important;
  border-radius:999px !important;
}

/* en pantallas medianas se reduce un poco para que sigan entrando dos */
@media (max-width:1200px){
  .hero .cta .btn{font-size:15px !important;padding:12px 14px !important}
}
@media (max-width:640px){
  .hero .cta .btn{white-space:normal !important;width:100% !important;text-align:center !important}
  .hero .trust span{font-size:13px !important}
}


/* mismo relleno interior del panel en los tres temas: así las pastillas
   se parten exactamente igual */
.hero .wrap{padding:30px 32px !important}

/* el titular y el párrafo, con el mismo ancho útil */
.hero h1{max-width:15ch !important}
.hero .lead{max-width:46ch !important}
@media (max-width:640px){
  .hero .wrap{padding:22px 18px !important}
  .hero h1, .hero .lead{max-width:none !important}
}


/* la sombra dura del panel se salía del héroe y overflow la cortaba:
   le damos aire abajo para que la sombra se vea entera */
.hero{
  padding-top:10px !important;
  padding-bottom:34px !important;
}
/* en split no hay panel, así que no hace falta ese aire extra */
html[data-tema="split"] .hero{padding-bottom:0 !important}
@media (max-width:900px){
  .hero{padding-bottom:24px !important}
}


/* =====================================================================
   El robot fantasma de fondo en las páginas que no tienen héroe
   (cursos, herramienta del nombre, guías). El héroe ya lo lleva encima.
   ===================================================================== */
body:not(:has(.hero)){
  background-image:url("/assets/robot-fondo.webp");
  background-repeat:no-repeat;
  background-position:right -10vw bottom -14vh;
  background-size:min(44vw,540px);
  background-attachment:fixed;
}
html[data-tema="noche"] body:not(:has(.hero)){
  background-image:url("/assets/robot-fondo-oscuro.webp");
}
@media (max-width:900px){
  body:not(:has(.hero)){
    background-size:78vw;
    background-position:right -12vw bottom -4vh;
  }
}



/* =====================================================================
   En monitores anchos el hero se estiraba de borde a borde: el texto se
   iba a la izquierda y el robot a la derecha, mientras las secciones de
   abajo quedan centradas en 1120px. Aqui se le da el mismo margen.
   ===================================================================== */
.hero{
  padding-left:max(24px, calc((100% - 1120px) / 2)) !important;
  padding-right:max(24px, calc((100% - 1120px) / 2)) !important;
}

/* =====================================================================
   El robot va pegado al panel, no al borde del contenedor.
   Hero = fila centrada: [panel] [robot] con el robot metido debajo del
   panel (margen negativo), asi el solape se ve en cualquier ancho.
   ===================================================================== */
.hero{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:0 !important;
  min-height:0 !important;
}
.hero .wrap{order:1;margin:0 !important;flex:0 1 auto;z-index:2;min-width:0 !important}
.hero-fondo{
  position:relative !important;inset:auto !important;order:2;
  width:auto !important;height:auto !important;max-width:none !important;
  margin:0 0 0 -140px !important;
  display:block !important;pointer-events:none;
}
.hero-fondo img{
  height:min(64vh,560px) !important;width:auto !important;max-width:52vw !important;
  object-fit:contain !important;object-position:50% 50% !important;
  -webkit-mask-image:none !important;mask-image:none !important;
}
@media (max-width:900px){
  .hero{
    flex-direction:column !important;align-items:stretch !important;
    padding:14px 16px 26px !important;
  }
  .hero .wrap{
    box-sizing:border-box !important;
    width:100% !important;max-width:100% !important;
    margin:0 !important;padding:22px 16px !important;order:1;
  }
  .hero-fondo{margin:-16px 0 0 !important;order:2;width:100% !important}
  .hero-fondo img{height:min(30vh,220px) !important;max-width:86vw !important;margin:0 auto !important;display:block}
  .hero h1,.hero .lead{max-width:none !important}
  .hero h1 .grad{white-space:normal !important}
  .hero h1{overflow-wrap:anywhere}
  .hero .cta .btn{width:100% !important;justify-content:center !important}
}

/* =====================================================================
   LEGIBILIDAD
   Atkinson Hyperlegible: tipografia disenada para baja vision, con trazos
   mas gruesos y letras que no se confunden entre si. Se sirve desde el
   propio servidor (sin Google Fonts).
   ===================================================================== */
@font-face{
  font-family:"Atkinson";
  src:url("/assets/fuentes/atkinson-400.woff2") format("woff2");
  font-weight:400;font-style:normal;font-display:swap;
}
@font-face{
  font-family:"Atkinson";
  src:url("/assets/fuentes/atkinson-700.woff2") format("woff2");
  font-weight:700;font-style:normal;font-display:swap;
}
body{
  font-family:"Atkinson","Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,sans-serif !important;
  font-size:17px !important;
  line-height:1.62 !important;
  font-weight:400;
  letter-spacing:.005em;
}
p,li,label,td,th,figcaption{
  font-size:1.02em;
  line-height:1.62;
}
h1,h2,h3,h4{letter-spacing:-.005em}
button,input,select,textarea{font-family:inherit !important}

/* =====================================================================
   MENU UNICO: misma fila en todas las paginas, sin desbordar
   ===================================================================== */
header nav, header > div{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  row-gap:8px;
}
header nav a, header nav button, header > div a, header > div button{
  white-space:nowrap;
}
/* el enlace de la pagina en la que estas, marcado */
@media (max-width:760px){
  header nav, header > div{justify-content:flex-start}
}
/* sin iconos automaticos en el menu: igual en todas las paginas */
header nav a::before, header nav button::before,
header > div a::before, header > div button::before{
  content:none !important;
  margin:0 !important;
}

/* cabecera: logo y menu alineados en la misma linea */
header{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
/* =====================================================================
   Botón de tema: uno solo, alterna a cada pulsación
   ===================================================================== */
#btnTema{
  font-weight:800 !important;
  font-size:15.5px !important;
  padding:11px 16px !important;
  cursor:pointer;
  display:inline-flex;align-items:center;gap:7px;
  min-width:132px;justify-content:center;
}
#btnTema .tema-ico{font-size:15px;line-height:1}
#btnTema:active{transform:rotate(0) translateY(1px)}

/* =====================================================================
   Carácter del día en pincel (Ma Shan Zheng recortada a 7 caracteres: 2 KB)
   ===================================================================== */
@font-face{
  font-family:"Pincel";
  src:url("/assets/fuentes/pincel.woff2") format("woff2");
  font-weight:400;font-style:normal;font-display:swap;
}
.caracter-hz{
  font-family:"PincelTexto","Pincel","Noto Serif SC","Songti SC","SimSun",serif !important;
  font-size:132px !important;
  letter-spacing:0;
}
@media (max-width:520px){
  .caracter-hz{font-size:96px !important}
}
/* sello del logo junto al nombre */
header .logo, header .brand{display:inline-flex;align-items:center;gap:9px}
header .logo-sello{
  width:34px;height:34px;border-radius:50%;flex:0 0 auto;
  display:block;object-fit:cover;
}
@media (max-width:520px){
  header .logo-sello{width:28px;height:28px}
}

/* =====================================================================
   Marca de la cabecera: cabeza del robot sin fondo + xiexie.es en pincel
   ===================================================================== */
@font-face{
  font-family:"PincelMarca";
  src:url("/assets/fuentes/pincel-marca.woff2") format("woff2");
  font-weight:400;font-display:swap;
}
header .logo, header .brand{display:inline-flex;align-items:center;gap:12px}
header .logo-sello{
  width:56px !important;height:56px !important;border-radius:50%;
  display:block;object-fit:contain;flex:0 0 auto;
  filter:drop-shadow(0 2px 3px rgba(20,20,20,.25));
}
header .logo, header .brand{
  font-family:"PincelMarca","Atkinson",system-ui,sans-serif !important;
  font-weight:400 !important;
  font-size:34px !important;
  line-height:1.1 !important;
  letter-spacing:.01em;
  text-transform:lowercase;
}

@media (max-width:640px){
  header .logo-sello{width:42px !important;height:42px !important}
  header .logo, header .brand{font-size:26px !important;gap:9px}
}
/* el 谢谢 de la marca: igual que los demás botones (fondo oscuro, letra clara) */
header .logo .cn, header .brand .cn{
  font-family:"PincelMarca",serif !important;
  font-size:.70em !important;
  padding:3px 13px !important;
  vertical-align:middle;
  border-radius:999px !important;
  background:#141414 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border:0 !important;
  font-weight:400 !important;
}
html[data-tema="noche"] header .logo .cn,
html[data-tema="noche"] header .brand .cn{
  background:#1b2130 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10);
}
/* el 谢谢 de la marca cuando el span no lleva clase (rutinas y herramienta del nombre) */
header .logo > span:not(.logo-sello),
header .brand > span:not(.logo-sello){
  font-family:"PincelMarca",serif !important;
  font-size:.70em !important;
  padding:3px 13px !important;
  vertical-align:middle;
  border-radius:999px !important;
  background:#141414 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border:0 !important;
  font-weight:400 !important;
  display:inline-block;
}
html[data-tema="noche"] header .logo > span:not(.logo-sello),
html[data-tema="noche"] header .brand > span:not(.logo-sello){
  background:#1b2130 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10);
}
/* pastillas del menu mas compactas: caben en una fila en cualquier página */
header nav a, header nav button,
header > div a.volver{
  font-size:13.5px !important;
  padding:8px 12px !important;
  line-height:1.15 !important;
}
header .logo-sello{width:46px !important;height:46px !important}
header .logo, header .brand{font-size:30px !important;gap:9px !important}
/* la marca no se encoge y el menu se pega a la derecha, sin solaparse */
header .logo, header .brand{
  flex:0 0 auto;
  white-space:nowrap;
  min-width:0;
}
header nav, header > div > nav{margin-left:auto}
header .logo .cn, header .brand .cn,
header .logo > span:not(.logo-sello){
  margin:0 !important;
  position:static !important;
}
/* =====================================================================
   Conmutador de idioma ES | 中文
   ===================================================================== */
.sel-idioma{display:inline-flex;align-items:center;gap:0;border-radius:999px;overflow:hidden}
.sel-idioma .btn.lang{
  font-size:13.5px !important;padding:8px 12px !important;
  border-radius:0 !important;min-width:44px;
  opacity:.75;
}
.sel-idioma .btn.lang.activo{
  opacity:1;
  outline:0;
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:2px;
}
html[data-tema="noche"] .sel-idioma .btn.lang.activo{outline:0}

/* aviso flotante cuando el idioma aún no está disponible */
.aviso-idioma{
  position:fixed;left:50%;bottom:24px;transform:translate(-50%, 20px);
  background:#141414;color:#ffd400;border:3px solid #141414;border-radius:14px;
  padding:12px 18px;font-weight:700;font-size:15px;max-width:min(92vw,520px);
  box-shadow:6px 6px 0 rgba(20,20,20,.5);z-index:200;
  opacity:0;pointer-events:none;transition:opacity .18s, transform .18s;
}
.aviso-idioma.visible{opacity:1;transform:translate(-50%, 0)}
html[data-tema="noche"] .aviso-idioma{
  background:#1b2130;color:#cfe6ff;border:1px solid rgba(255,255,255,.14);
  box-shadow:0 18px 40px rgba(0,0,0,.6);
}
/* =====================================================================
   Botones en tema oscuro: amarillo de la marca en vez del degradado cian
   ===================================================================== */
html[data-tema="noche"] .btn.primary,
html[data-tema="noche"] a.btn.primary,
html[data-tema="noche"] .card .btn,
html[data-tema="noche"] .caja .btn,
html[data-tema="noche"] .rutina-caja .btn{
  background:#ffd400 !important;
  color:#141414 !important;
  -webkit-text-fill-color:#141414 !important;
  border:0 !important;
  box-shadow:none !important;
  font-weight:800 !important;
}
html[data-tema="noche"] .btn.primary:hover,
html[data-tema="noche"] a.btn.primary:hover,
html[data-tema="noche"] .card .btn:hover,
html[data-tema="noche"] .caja .btn:hover,
html[data-tema="noche"] .rutina-caja .btn:hover{
  background:#ffe24d !important;
}
/* el resto de botones "principales" (lecciones, tarjetas, herramientas) */
html[data-tema="noche"] button.principal,
html[data-tema="noche"] .btn-caja button,
html[data-tema="noche"] .buscador button,
html[data-tema="noche"] .acciones button.principal,
html[data-tema="noche"] .leccion .btn,
html[data-tema="noche"] button#btnVer,
html[data-tema="noche"] #btnPlay{
  background:#ffd400 !important;
  color:#141414 !important;
  -webkit-text-fill-color:#141414 !important;
  border:0 !important;
  box-shadow:none !important;
  font-weight:800 !important;
}
html[data-tema="noche"] button.principal:hover,
html[data-tema="noche"] .btn-caja button:hover,
html[data-tema="noche"] button#btnVer:hover{
  background:#ffe24d !important;
}

/* la cabecera cabe en una fila tambien en pantallas medianas */
@media (max-width:1240px){
  header nav a, header nav button,
  header > div a.volver{font-size:12.8px !important;padding:7px 10px !important}
  header .logo, header .brand{font-size:25px !important;gap:8px !important}
  header .logo-sello{width:40px !important;height:40px !important}
  #btnTema{min-width:106px !important;font-size:13.5px !important;padding:8px 11px !important}
  .sel-idioma .btn.lang{font-size:12.5px !important;padding:7px 9px !important;min-width:38px !important}
}
/* tambien en amarillo el bloque del caracter, los numeros de leccion y la barra */
html[data-tema="noche"] .caracter-hz,
html[data-tema="noche"] .leccion .num,
html[data-tema="noche"] .post .num{
  background:#ffd400 !important;
  color:#141414 !important;
  -webkit-text-fill-color:#141414 !important;
  border:0 !important;
}
html[data-tema="noche"] .barra i{
  background:#ffd400 !important;
}
html[data-tema="noche"] .caracter-caja{
  border-color:#ffd400 !important;
}
/* =====================================================================
   Menu: pastillas centradas, sombra suave y conmutador de idioma limpio
   ===================================================================== */
header nav a, header nav button, header > div a.volver{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  text-align:center;
  box-shadow:0 2px 6px rgba(20,20,20,.16) !important;
}
header nav a:hover, header nav button:hover{
  box-shadow:0 4px 10px rgba(20,20,20,.22) !important;
}

/* conmutador ES | 中文: una sola pastilla, mitades redondeadas */
.sel-idioma{
  display:inline-flex;align-items:center;gap:0;
  background:#141414;
  border-radius:999px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(20,20,20,.16);
}
.sel-idioma .btn.lang{
  border-radius:0 !important;
  background:transparent !important;
  color:#fffbe8 !important;
  -webkit-text-fill-color:#fffbe8 !important;
  box-shadow:none !important;
  border:0 !important;
  min-width:46px;
  padding:8px 12px !important;
  opacity:.72;
}
.sel-idioma .btn.lang.activo{
  background:#ffd400 !important;
  color:#141414 !important;
  -webkit-text-fill-color:#141414 !important;
  opacity:1;
  text-decoration:none !important;
}
html[data-tema="noche"] .sel-idioma{
  background:#1b2130;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10);
}
html[data-tema="noche"] .sel-idioma .btn.lang{color:#e8eef7 !important;-webkit-text-fill-color:#e8eef7 !important}
html[data-tema="noche"] .sel-idioma .btn.lang.activo{
  background:#ffd400 !important;color:#141414 !important;-webkit-text-fill-color:#141414 !important;
}
/* =====================================================================
   Esquema de los tres pasos de la IA (artículo de programación)
   ===================================================================== */
.pasos-ia{display:flex;align-items:stretch;gap:12px;margin:26px 0 34px;flex-wrap:wrap}
.paso-ia{
  flex:1 1 210px;min-width:0;
  background:#fffbe8;border:4px solid #141414;border-radius:16px;
  box-shadow:7px 7px 0 #141414;padding:18px 18px 16px;
}
.paso-n{
  width:34px;height:34px;border-radius:50%;background:#141414;color:#ffd400;
  display:grid;place-items:center;font-weight:900;font-size:19px;margin-bottom:10px;
}
.paso-ia h3{margin:0 0 6px;font-size:19px;line-height:1.25}
.paso-ia p{margin:0;font-size:15.5px;line-height:1.5;color:#3b3b3b}
.paso-flecha{align-self:center;font-size:30px;font-weight:900;color:#141414;flex:0 0 auto}
html[data-tema="noche"] .paso-ia{
  background:#161b26;border-color:#ffd400;
  box-shadow:0 10px 26px rgba(0,0,0,.5);
}
html[data-tema="noche"] .paso-ia h3{color:#fff}
html[data-tema="noche"] .paso-ia p{color:#c7d2e4}
html[data-tema="noche"] .paso-n{background:#ffd400;color:#141414}
html[data-tema="noche"] .paso-flecha{color:#ffd400}
@media (max-width:760px){
  .paso-flecha{display:none}
  .paso-ia{flex:1 1 100%}
}
/* el botón de idioma viejo de las guías lo sustituye el conmutador ES | 中文 */
header #btnIdioma{display:none !important}
/* iconos generados (tarjetas y apartados) */
html:not([data-tema="noche"]) .ico-img{filter:none !important}
.card .ico img, .door .ico img{
  width:52px;height:52px;display:block;object-fit:contain;
}
html:not([data-tema="noche"]) .ico-img{
  width:64px;height:64px;
}
/* aviso de progreso: texto normal, no flex (partía las frases) */
.xs-aviso{display:block !important;line-height:1.5 !important}
.xs-aviso b{font-weight:800}
/* caja de enlace al otro curso (la comparten las dos páginas) */
.otro{
  background:#123f38;border:3px solid rgba(255,255,255,.14);border-radius:16px;
  padding:14px 18px;margin:0 0 22px;font-size:15px;line-height:1.5;color:#d7f7e6;
}
.otro a{color:#d8ff3e !important;font-weight:800}
/* fila de herramientas del héroe: misma píldora que las garantías, pero clicable */
.hero .trust a{
  display:inline-flex;align-items:center;gap:6px;
  font-size:13.5px;font-weight:700;text-decoration:none;
  padding:7px 13px;border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#eafff6 !important;-webkit-text-fill-color:#eafff6 !important;
  border:1.5px solid rgba(216,255,62,.45);
  transition:background .15s,border-color .15s;
}
.hero .trust a:hover{background:rgba(216,255,62,.16);border-color:#d8ff3e}
.trust-herramientas{margin-top:10px}
@media (max-width:520px){
  .hero .trust a{font-size:12.5px;padding:6px 10px}
}
/* filas del héroe: reparto limpio del espacio */
.hero .trust{
  display:flex !important;flex-wrap:wrap;gap:8px;align-items:center;
}
.hero .trust span{font-size:13px;padding:6px 12px}
.trust-herramientas{gap:10px !important;margin-top:14px !important}

/* =====================================================================
   CABECERA ÚNICA (última palabra: nada de aquí en adelante la sobreescribe)
   - sin marca: el menú ocupa todo el ancho
   - se queda fija arriba
   - tres tallas según el ancho
   ===================================================================== */
header, header.top{
  position:sticky !important;top:0;z-index:60;
  display:flex !important;align-items:center !important;justify-content:center !important;
  gap:10px !important;flex-wrap:wrap !important;
  width:100% !important;max-width:100% !important;margin:0 !important;
  padding:14px 16px !important;
  left:0;right:0;
  background:transparent !important;
  -webkit-backdrop-filter:blur(12px) saturate(1.05);
          backdrop-filter:blur(12px) saturate(1.05);
  border-bottom:1px solid rgba(255,255,255,.06) !important;
}
header .wrap{display:contents !important}

html body header nav,
html body header > div{
  display:flex !important;flex-wrap:wrap !important;align-items:center !important;
  justify-content:center !important;gap:8px !important;margin:0 auto !important;
}

html body header nav a,
html body header nav button,
html body header > div a{
  font-size:15px !important;
  padding:10px 15px !important;
  margin:0 !important;
  line-height:1.15 !important;
}

@media (max-width:1250px){
  html body header nav a,
  html body header nav button,
  html body header > div a{font-size:13px !important;padding:8px 12px !important}
}
@media (max-width:1050px){
  html body header nav a,
  html body header nav button,
  html body header > div a{font-size:12px !important;padding:7px 10px !important}
  header, header.top{padding:10px 10px !important;gap:6px !important}
}

/* =====================================================================
   Menú con icono y etiqueta, con el efecto del tutorial pero moderno:
   flex en vez de float, transiciones en transform y box-shadow,
   sin -webkit obligatorio, y 64 px de alto en vez de 230.
   ===================================================================== */
html body header nav{gap:6px !important}
html body header nav a.nav-tile{
  display:inline-flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-width:74px;
  padding:7px 10px 6px !important;
  border-radius:14px !important;
  line-height:1.1 !important;
  transition:transform .18s ease, background-color .18s ease,
             box-shadow .18s ease, border-color .18s ease;
  will-change:transform;
}
html body header nav a.nav-tile .nav-ico{
  font-size:18px;
  line-height:1;
  transition:transform .18s ease;
}
html body header nav a.nav-tile .nav-txt{
  font-size:12.5px;
  font-weight:700;
  letter-spacing:.01em;
  white-space:nowrap;
}
/* el efecto: la píldora sube y se enciende, y el icono crece un poco */
html body header nav a.nav-tile:hover{
  transform:translateY(-3px);
  background:rgba(216,255,62,.14) !important;
  border-color:rgba(216,255,62,.55) !important;
  box-shadow:0 8px 20px rgba(0,0,0,.35), 0 0 0 1px rgba(216,255,62,.35);
}
html body header nav a.nav-tile:hover .nav-ico{transform:scale(1.18)}
html:not([data-tema="noche"]) header nav a.nav-tile.menu-activo{
  background:rgba(216,255,62,.18) !important;
  border-color:#d8ff3e !important;
}
html[data-tema="noche"] header nav a.nav-tile:hover{
  background:rgba(79,172,254,.18) !important;
  border-color:rgba(79,172,254,.6) !important;
}
@media (max-width:1050px){
  html body header nav a.nav-tile{min-width:62px;padding:6px 8px 5px !important}
  html body header nav a.nav-tile .nav-txt{font-size:10.5px}
  html body header nav a.nav-tile .nav-ico{font-size:15px}
}
/* ---- banderas dentro de los dos botones de curso ---- */
/* España: rojo, amarillo, rojo (de arriba abajo, como la bandera) */
html body header nav a.nav-tile[data-banda="es"] .nav-ico{
  font-weight:900;
  background:linear-gradient(180deg,
      #c60b1e 0 26%,
      #ffc400 26% 74%,
      #c60b1e 74% 100%);
  -webkit-background-clip:text;
          background-clip:text;
  color:transparent !important;
  -webkit-text-fill-color:transparent !important;
}
/* China: rojo con la estrella amarilla al lado */
html body header nav a.nav-tile[data-banda="cn"] .nav-ico{
  font-weight:900;
  color:#de2910 !important;
  -webkit-text-fill-color:#de2910 !important;
  position:relative;
}
html body header nav a.nav-tile[data-banda="cn"] .nav-ico::after{
  content:"★";
  position:absolute;
  top:-3px;right:-7px;
  font-size:8px;
  color:#ffd400;
  -webkit-text-fill-color:#ffd400;
}
/* ---- los cursos tienen el menú en un div: mismas piezas que el resto ---- */
html body header > div a.nav-tile{
  display:inline-flex !important;
  flex-direction:column;align-items:center;justify-content:center;gap:3px;
  min-width:74px;padding:7px 10px 6px !important;border-radius:14px !important;
  line-height:1.1 !important;
  transition:transform .18s ease, background-color .18s ease,
             box-shadow .18s ease, border-color .18s ease;
}
html body header > div a.nav-tile .nav-ico{font-size:18px;line-height:1;transition:transform .18s ease}
html body header > div a.nav-tile .nav-txt{font-size:12.5px;font-weight:700;white-space:nowrap}
html body header > div a.nav-tile:hover{
  transform:translateY(-3px);
  background:rgba(216,255,62,.14) !important;
  border-color:rgba(216,255,62,.55) !important;
  box-shadow:0 8px 20px rgba(0,0,0,.35), 0 0 0 1px rgba(216,255,62,.35);
}
html body header > div a.nav-tile:hover .nav-ico{transform:scale(1.18)}

/* ---- el conmutador de idioma y el botón de color, igual que los demás ---- */
html body header #selIdioma,
html body header #btnTema{
  min-height:56px !important;height:56px !important;
  border-radius:14px !important;
  border:1.5px solid rgba(255,255,255,.18) !important;
  background:rgba(255,255,255,.04) !important;
  display:inline-flex !important;align-items:center;justify-content:center;
  margin:0 !important;box-shadow:none !important;
  transition:background-color .18s ease, border-color .18s ease, transform .18s ease;
}
html body header #btnTema{
  flex-direction:column !important;gap:2px !important;
  min-width:86px !important;padding:6px 12px !important;
}
html body header #btnTema .tema-ico{font-size:17px;line-height:1}
html body header #btnTema .tema-nombre{font-size:12.5px;font-weight:700;white-space:nowrap}
html body header #selIdioma .btn.lang{
  height:100% !important;border-radius:0 !important;margin:0 !important;
  font-size:13px !important;font-weight:800 !important;
  padding:0 14px !important;min-width:46px;
}
html body header #btnTema:hover,
html body header #selIdioma:hover{
  background:rgba(216,255,62,.10) !important;
  border-color:rgba(216,255,62,.45) !important;
}
/* =====================================================================
   Secciones en hexágonos (panal) — moderno: clip-path + flex, sin imágenes
   ===================================================================== */
.hex-fila{
  display:flex;justify-content:center;gap:14px;flex-wrap:wrap;margin:0 auto 6px;
}
.hex-fila-off{margin-top:-44px;padding-left:82px}
.hex{
  width:150px;height:170px;
  clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  background:linear-gradient(160deg, rgba(216,255,62,.22), rgba(87,217,163,.14));
  text-decoration:none;color:#eafff6;
  transition:transform .2s ease, background .2s ease, filter .2s ease;
}
.hex:hover{
  transform:translateY(-4px);
  background:linear-gradient(160deg, rgba(216,255,62,.42), rgba(87,217,163,.26));
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.45));
}
.hex-ico{font-size:30px;line-height:1;font-weight:900;color:#07211c;text-shadow:none}
.hex[data-banda="cn"] .hex-ico{color:#de2910}
.hex[data-banda="es"] .hex-ico{
  background:linear-gradient(180deg,#c60b1e 0 26%,#ffc400 26% 74%,#c60b1e 74%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hex-txt{font-size:13.5px;font-weight:800;text-align:center;line-height:1.2;padding:0 14px}
@media (max-width:720px){
  .hex-fila-off{padding-left:66px;margin-top:-34px}
  .hex{width:118px;height:134px}
  .hex-ico{font-size:24px}
  .hex-txt{font-size:12px}
  .hex-fila-off{margin-top:-36px}
}
/* la cabecera se desliza fuera al bajar y vuelve al subir */
header, header.top{
  transition:transform .28s cubic-bezier(.4,0,.2,1), background-color .2s ease;
}
header.oculta, header.top.oculta{
  transform:translateY(-100%);
}
/* una sola fila: la etiqueta puede partirse en dos líneas dentro del bloque */
html body header nav a.nav-tile,
html body header > div a.nav-tile{
  min-width:0 !important;
  padding:6px 9px 5px !important;
}
html body header nav a.nav-tile .nav-txt,
html body header > div a.nav-tile .nav-txt{
  white-space:normal !important;
  max-width:82px;
  text-align:center;
  line-height:1.05;
  font-size:11.5px;
  hyphens:none;
}
html body header nav,
html body header > div{gap:5px !important;flex-wrap:nowrap !important}
@media (max-width:860px){
  html body header nav,
  html body header > div{flex-wrap:wrap !important}
}
/* =====================================================================
   MENÚ EN LÍNEA CORRIDA: sin forma de botón, todo igual de alto,
   separado por una línea fina entre cada entrada.
   ===================================================================== */
html body header nav,
html body header > div{
  gap:0 !important;flex-wrap:nowrap !important;
  align-items:stretch !important;
}
html body header nav a,
html body header nav button,
html body header > div a{
  display:inline-flex !important;align-items:center !important;justify-content:center !important;
  height:42px !important;min-height:42px !important;
  padding:0 14px !important;
  background:transparent !important;
  border:0 !important;border-radius:0 !important;box-shadow:none !important;
  font-size:13.5px !important;font-weight:700 !important;
  white-space:nowrap !important;
  position:relative;
  transform:none !important;
}
/* la línea que separa cada entrada */
html body header nav a + a::before,
html body header nav button::before,
html body header > div a + a::before,
html body header > div button::before{
  content:"";
  position:absolute;left:0;top:22%;bottom:22%;
  width:1px;background:rgba(255,255,255,.20);
}
html body header nav a:hover,
html body header nav button:hover,
html body header > div a:hover{
  background:rgba(216,255,62,.10) !important;
  color:#eaff8f !important;
}
html body header nav a .nav-ico,
html body header > div a .nav-ico{display:none !important}
html body header nav a .nav-txt,
html body header > div a .nav-txt{
  max-width:none !important;white-space:nowrap !important;font-size:13.5px !important;
}
/* el conmutador y el color, al mismo alto y sin caja */
html body header #selIdioma,
html body header #btnTema{
  height:42px !important;min-height:42px !important;
  border:0 !important;border-radius:0 !important;background:transparent !important;
  padding:0 12px !important;
}
html body header #selIdioma .btn.lang{font-size:13px !important;padding:0 8px !important}
@media (max-width:900px){
  html body header nav,
  html body header > div{flex-wrap:wrap !important;justify-content:center !important}
  html body header nav a,
  html body header nav button,
  html body header > div a{height:38px !important;min-height:38px !important;padding:0 10px !important;font-size:12.5px !important}
}
/* hexágonos: 7 en una sola fila, más pequeños */
.hex-fila{flex-wrap:nowrap !important;gap:8px !important}
.hex-fila-off{display:none !important}
.hex{width:132px !important;height:148px !important}
.hex-ico{font-size:26px}
.hex-txt{font-size:12px;padding:0 8px}
@media (max-width:1000px){
  .hex-fila{flex-wrap:wrap !important;gap:6px !important}
  .hex{width:118px !important;height:134px !important}
}
@media (max-width:520px){
  .hex{width:96px !important;height:110px !important}
  .hex-ico{font-size:20px}
  .hex-txt{font-size:10.5px}
}
/* la marca no se muestra en la cabecera (por hoja de estilos, no por JS) */
header .brand, header .logo, header .logo-sello{display:none !important}
/* separadores de verdad: una línea a la izquierda de cada entrada */
html body header nav a,
html body header nav button,
html body header > div a,
html body header > div button{
  border-left:1px solid rgba(255,255,255,.18) !important;
}
html body header nav a:first-child,
html body header > div a:first-child,
html body header nav > :first-child,
html body header > div > :first-child{border-left:0 !important}
/* la página activa: sin pastilla, solo color y subrayado */
html body header nav a.menu-activo,
html body header > div a.menu-activo,
html:not([data-tema="noche"]) header nav a.nav-tile.menu-activo{
  background:transparent !important;
  border-color:rgba(255,255,255,.18) !important;
  color:#d8ff3e !important;
  box-shadow:inset 0 -2px 0 #d8ff3e !important;
}
/* remate final: todo plano, mismo alto, y la activa solo con color */
html body header nav a,
html body header nav button,
html body header > div a,
html body header > div button{
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
  border-top:0 !important;border-right:0 !important;border-bottom:0 !important;
  border-left:1px solid rgba(255,255,255,.18) !important;
}
html body header nav > a:first-child,
html body header > div > a:first-child,
html body header nav > button:first-child,
html body header > div > button:first-child{border-left:0 !important}

html body header nav a.nav-tile.menu-activo,
html body header > div a.nav-tile.menu-activo,
html body header nav a.menu-activo,
html body header > div a.menu-activo{
  background:transparent !important;
  color:#d8ff3e !important;
  -webkit-text-fill-color:#d8ff3e !important;
  box-shadow:inset 0 -2px 0 #d8ff3e !important;
  border-radius:0 !important;
}
html body header nav a.menu-activo::after,
html body header > div a.menu-activo::after{display:none !important}
/* los bloques heredaban radio y fondo de .nav-tile: se anulan con la misma fuerza */
html body header nav a.nav-tile,
html body header > div a.nav-tile,
html body header nav button.nav-tile,
html body header > div button.nav-tile{
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
  border-top:0 !important;border-right:0 !important;border-bottom:0 !important;
  border-left:1px solid rgba(255,255,255,.18) !important;
  transform:none !important;
}
html body header nav > a.nav-tile:first-child,
html body header > div > a.nav-tile:first-child{border-left:0 !important}

/* el botón de color, también plano y con su separador */
html body header #btnTema{
  background:transparent !important;
  border:0 !important;border-left:1px solid rgba(255,255,255,.18) !important;
  border-radius:0 !important;box-shadow:none !important;
  height:42px !important;min-height:42px !important;
  flex-direction:row !important;gap:7px !important;
  padding:0 14px !important;min-width:0 !important;
}
html body header #btnTema .tema-ico{font-size:15px}
html body header #btnTema .tema-nombre{font-size:13.5px !important}
html body header #btnTema.btn.lang{
  background:transparent !important;
  border:0 !important;border-left:1px solid rgba(255,255,255,.18) !important;
  border-radius:0 !important;box-shadow:none !important;
  height:42px !important;min-height:42px !important;
  flex-direction:row !important;gap:7px !important;
  padding:0 14px !important;min-width:0 !important;
}
html body header #btnTema.btn.lang:hover{background:rgba(216,255,62,.10) !important}
/* el menú, un poco más grande: que no parezca letra pequeña */
html body header nav a,
html body header nav button,
html body header > div a,
html body header > div button{
  font-size:15.5px !important;
  height:46px !important;min-height:46px !important;
  padding:0 16px !important;
}
html body header nav a .nav-txt,
html body header > div a .nav-txt{font-size:15.5px !important}
html body header #selIdioma,
html body header #btnTema.btn.lang{height:46px !important;min-height:46px !important}
html body header #selIdioma .btn.lang{font-size:14.5px !important}
html body header #btnTema.btn.lang .tema-nombre{font-size:15.5px !important}

@media (max-width:1150px){
  html body header nav a,
  html body header nav button,
  html body header > div a,
  html body header > div button{font-size:14px !important;padding:0 12px !important}
  html body header nav a .nav-txt,
  html body header > div a .nav-txt{font-size:14px !important}
  html body header #btnTema.btn.lang .tema-nombre{font-size:14px !important}
}
@media (max-width:900px){
  html body header nav a,
  html body header nav button,
  html body header > div a{font-size:13px !important;padding:0 9px !important}
  html body header nav a .nav-txt,
  html body header > div a .nav-txt{font-size:13px !important}
}
/* un poco más grande todavía, y el panel de idioma más junto */
@media (min-width:1080px){
  html body header nav a,
  html body header nav button,
  html body header > div a,
  html body header > div button{font-size:16.5px !important;height:48px !important;min-height:48px !important;padding:0 18px !important}
  html body header nav a .nav-txt,
  html body header > div a .nav-txt{font-size:16.5px !important}
  html body header #selIdioma,
  html body header #btnTema.btn.lang{height:48px !important;min-height:48px !important}
  html body header #btnTema.btn.lang .tema-nombre{font-size:16.5px !important}
}

/* el panel de idioma: título y botones más cerca, todo centrado */
.elige{
  justify-content:center !important;
  gap:clamp(24px,4vw,56px) !important;
}
.elige-titulo{flex:0 1 auto !important;max-width:none !important}

/* el carácter del día, un poco más pequeño */
#caracter .sec-head h2{font-size:clamp(26px,3vw,32px) !important}
#caracter .sec-head p{font-size:17px !important}
/* el panel de idioma, con el título pegado a los botones */
#eligeIdioma,
div.elige{
  justify-content:center !important;
  gap:clamp(20px,3vw,48px) !important;
}
#eligeIdioma .elige-titulo,
div.elige .elige-titulo{flex:0 0 auto !important;max-width:none !important}
/* texto de los hexágonos, más grande y legible */
.hex-txt{
  font-size:15px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  padding:0 10px !important;
  max-width:112px;
  margin:0 auto;
}
.hex-ico{font-size:30px !important}
@media (max-width:1000px){
  .hex-txt{font-size:13px !important;max-width:96px}
  .hex-ico{font-size:26px !important}
}
@media (max-width:520px){
  .hex-txt{font-size:11.5px !important;max-width:84px}
  .hex-ico{font-size:22px !important}
}
/* menos aire entre los hexágonos y la banda de sugerencias */
#secciones-hex{padding-top:40px !important;padding-bottom:8px !important}
#secciones-hex .sec-head{margin-bottom:22px !important}
#sugerencias{padding-top:8px !important;padding-bottom:34px !important}
#sugerencias .banda-ideas{margin-top:0 !important}
/* mismo criterio: juntar el carácter del día con "qué hay aquí" */
#caracter{padding-top:34px !important;padding-bottom:6px !important}
#caracter .sec-head{margin-bottom:20px !important}
#hay{padding-top:6px !important;padding-bottom:34px !important}
#hay .sec-head{margin-bottom:22px !important}


/* =====================================================================
   Pinyin del caracter del dia en pincel  (17-nov-2026)
   Misma familia que el subtitulo chino del hero. El fichero de 2 KB no
   lleva letras latinas, por eso se usa la version completa (402 KB, en
   cache un ano). Para deshacerlo: borrar este bloque entero.
   ===================================================================== */
@font-face{
  font-family:"PincelTexto";
  src:url("/assets/fuentes/pincel-completo.woff2") format("woff2");
  font-weight:400;font-style:normal;font-display:swap;
}
.caracter-py{
  font-family:Georgia,"Iowan Old Style","Times New Roman","Songti SC",SimSun,serif !important;
  font-style:italic !important;
  font-weight:700 !important;
  font-size:40px !important;
  line-height:1.15 !important;
  letter-spacing:.01em;
}
