/* Portada compacta: contenido y personaje comparten la misma hoja. */
main > section.home-hero { min-height: 0; height: auto; padding: clamp(24px,3vw,42px); }
.home-hero .hero-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 30px; align-items: center; }
.home-hero .hero-copy,.home-hero .hero-mascot { grid-column: auto; min-width: 0; }
.home-hero .hero-copy h1 { font-size: clamp(1.9rem,2.9vw,3.05rem) !important; line-height: 1.14 !important; }
.home-hero .hero-copy > p { max-width: 66ch; }
.home-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.home-hero .hero-actions a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 16px; font-size: clamp(16px,1.25vw,20px); line-height: 1.35; text-align: center; }
.home-hero .hero-actions > span { flex-basis: 100%; font-size: 16px; }
.home-hero .hero-mascot > div { padding: 24px; }
.home-hero .hero-mascot img { width: clamp(155px,18vw,235px); }
@media(min-width: 900px) {
  .home-hero .hero-grid { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: clamp(26px,3vw,48px); }
  .home-hero .hero-actions a { flex: 1 1 235px; }
}
/* Texto profesional con medida legible, también en pantallas grandes. */
.science-page main > header.paper-sheet > p { max-width: 75ch; font-size: clamp(19px,1.15vw,22px) !important; line-height: 1.75; }
.science-page main > header.paper-sheet > div:not(.doodle-spark) { font-size: 16px !important; }
.science-page main > header.paper-sheet > div p { font-size: clamp(17px,1.05vw,20px) !important; line-height: 1.7; }
.science-page main .paper-sheet > .font-mono,.science-page main .metric-heading > span { font-size: 16px !important; }
.science-page main .paper-sheet :is(li,label),.science-page main .paper-sheet p[class] { font-size: 18px !important; }
.science-page main > header.paper-sheet h1 { max-width: 30ch; font-size: clamp(30px,3vw,54px) !important; }
.science-page main > header.paper-sheet > p.font-sans { font-size: clamp(20px,1.3vw,24px) !important; }
/* El estado de la página activa conserva el papel blanco del Inicio. */
.brand-header .header-menu-link[aria-current="page"],.brand-header .header-download[aria-current="page"] { background: #FFFDF5; border: 2px solid #0F172A; box-shadow: 3px 3px 0 #0F172A; }
.brand-header .menu-toggle { padding: 10px; }
.brand-header .menu-icon { width: 26px; height: 26px; transition: transform 300ms cubic-bezier(.2,.8,.2,1); }
.brand-header.menu-is-open .menu-toggle { background: #8ABBE6; }
/* Rellenos suaves y un pulso de luz en las acciones principales. */
.ui-icon :is(rect,circle,ellipse) { fill: rgb(138 187 230 / .32); transition: fill 220ms,stroke 220ms; }
.header-menu-link:hover .ui-icon :is(rect,circle,ellipse),.game-detail:hover .ui-icon :is(rect,circle,ellipse) { fill: #2DD4BF; }
.header-download .ui-icon,.hero-actions .ui-icon { animation: icon-light 5s ease-in-out infinite; }
.hero-actions a:nth-child(2) .ui-icon { animation-delay: 1.2s; }
.game-icon { transition: background 250ms,box-shadow 250ms; }
.game-detail:hover .game-icon,.home-game:hover > span { background: #FFF6CC; box-shadow: 0 0 0 5px rgb(45 212 191 / .18),0 0 20px rgb(45 212 191 / .35); }
@keyframes icon-light { 0%,65%,100% { filter: none; } 35% { filter: drop-shadow(0 0 4px #2DD4BF) drop-shadow(0 0 9px #8ABBE6); } }
@media(max-width: 1100px) {
  nav.brand-header.menu-is-open > .header-shell > .header-center { transform-origin: top right; animation: notebook-menu-open 320ms cubic-bezier(.2,.8,.2,1) both; }
  .brand-header.menu-is-open .header-menu-link { animation: menu-link-enter 300ms ease-out both; }
  .brand-header.menu-is-open .header-menu-link:nth-child(2) { animation-delay: 45ms; }
  .brand-header.menu-is-open .header-menu-link:nth-child(3) { animation-delay: 90ms; }
  .brand-header.menu-is-open .header-menu-link:nth-child(4) { animation-delay: 135ms; }
}
@keyframes notebook-menu-open { from { opacity: 0; transform: perspective(700px) rotateX(-8deg) translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes menu-link-enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media(max-width: 600px) {
  .home-hero .hero-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
  .home-hero .hero-actions a { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 15px; line-height: 1.35; }
  .home-hero .hero-actions a .ui-icon { width: 18px; height: 18px; }
  .home-hero .hero-actions > span { font-size: 14px; }
}
@media(prefers-reduced-motion:reduce) {
  .header-download .ui-icon,.hero-actions .ui-icon,nav.brand-header.menu-is-open > .header-shell > .header-center,.brand-header.menu-is-open .header-menu-link { animation: none !important; }
}
@media(max-width:360px) { .home-hero .hero-actions a { font-size: 14px; padding-inline: 8px; } }
.science-page main > header.science-welcome { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
.science-page main > header.science-welcome > * { margin-block: 0; min-width: 0; }
.science-greeting { justify-self: center; width: min(250px,70vw); }
.science-greeting picture,.science-greeting img { display: block; width: 100%; height: auto; }
@media(max-width: 600px) {
  .hero-mascot .avatar-greeting-row { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items: center; gap: 14px; width: 100%; padding: 6px 0 12px; }
  .hero-mascot .avatar-greeting-row img { width: 100%; max-width: 180px; margin: 0 auto; }
  .hero-mascot .avatar-greeting-label { position: static; min-width: 0; padding: 12px 8px; font-size: 13px !important; line-height: 1.5; transform: rotate(-3deg); }
  .hero-mascot .avatar-greeting-label .fokito-bulb { display: block; width: 22px; height: 22px; margin: 9px auto 0; }
}
@media(min-width: 1000px) {
  .science-page main > header.science-welcome { grid-template-columns: minmax(0,1fr) clamp(240px,24vw,340px); column-gap: 32px; }
  .science-welcome > :is(h1,p),.science-welcome > div { grid-column: 1; }
  .science-welcome > .science-greeting { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 100%; }
  .science-welcome > div:last-child { grid-column: 1 / -1; }
}
