/* ============================================================
   AVENTURA EDUCATIVA · UN SOLO VIAJE, TRES MUNDOS
   Solo afecta a index.html mediante .home-portal.
   styles.css conserva todos sus estilos compartidos originales.
   ============================================================ */
.home-portal {
    --home-ink: #141c34;
    --home-paper: #f4f1ff;
    --home-muted: #b8c4db;
    background: var(--home-ink);
    color: var(--home-paper);
    overflow-x: clip;
}
.home-portal :is(a,button):focus-visible { outline: 3px solid #ffe39b; outline-offset: 5px; }
.home-portal section[id] { scroll-margin-top: 115px; }
.home-portal .site-header {
    position: fixed;
    inset: 14px 20px auto;
    width: auto;
    height: auto;
    border: 1px solid #7082b5;
    border-bottom: 3px solid #576e9e;
    border-radius: 22px;
    background: #1b2543f5;
    box-shadow: 0 5px 0 #070f2455;
    overflow: visible!important;
    contain: none;
    z-index: 10000;
    transform: none!important;
    backdrop-filter: blur(14px);
}
.home-portal .site-header.is-scrolled { background: #1b2543fa; }
.home-portal .header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1600px,100%);
    height: auto;
    min-height: 84px;
    gap: 18px;
    padding: 12px 22px;
    overflow: visible!important;
}
.home-portal .brand { gap: 12px; min-width: 0; }
.home-portal .brand-logo {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border: 1px solid #b5baff;
    border-radius: 16px;
    background: linear-gradient(135deg,#7668c8,#387897);
    box-shadow: 0 4px 0 #101a30;
}
.home-portal .brand-logo-glow { display: none; }
.home-portal .brand-name {
    color: #f5f2ff;
    background: none;
    -webkit-text-fill-color: currentColor;
    -webkit-text-stroke: 0;
    text-shadow: none;
    font-size: clamp(.9rem,1.4vw,1.2rem);
    line-height: 1.2;
    letter-spacing: .01em;
}
.home-portal .brand-tagline { margin-top: 6px; font-size: .63rem; color: #bdc8e2; }
.home-portal .main-nav {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    overflow: visible;
}
.home-portal .nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #7282b24d;
    border-radius: 11px;
    background: #293452;
    color: #dce7ff;
    font: 800 .75rem 'Nunito',sans-serif;
    text-shadow: none;
    box-shadow: none;
    transition: transform .2s, background .2s;
}
.home-portal .nav-btn-ico svg { width: 19px; height: 19px; }
.home-portal .home-nav-robot { width: 28px; height: 28px; object-fit: contain; }
.home-portal .nav-btn:hover { background: #3a456e; transform: translateY(-2px); box-shadow: none; }
.home-portal .nav-btn.is-active { background: #485a85; border-color: #a2b4ea; color: #fff; text-shadow: none; box-shadow: none; }
.home-portal .nav-btn.nav-beebot.is-active { background: #594e2d; border-color: #f6cf68; color: #ffdf8f; }
.home-portal .nav-btn.nav-rayet.is-active { background: #5c3f38; border-color: #efa16d; color: #ffc99e; }
.home-portal .nav-btn.nav-ludio.is-active { background: #403c72; border-color: #ad9aff; color: #dbccff; }
.home-portal .nav-indicator { display: none; }
.home-portal .menu-toggle { display: none; }
.home-portal .scroll-progress { bottom: -3px; height: 3px; background: linear-gradient(90deg,#ffe180,#ffb884,#a89aff,#80dfff); }
.home-portal .sound-toggle {
    position: fixed;
    top: 118px;
    right: 22px;
    bottom: auto;
    left: auto;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #24314f;
    border: 1px solid #809bc0;
    color: #d2eaff;
    box-shadow: 0 3px 0 #101b2d;
    z-index: 9900;
}

/* La portada termina exactamente en el color del recorrido. */
.home-portal .hero {
    min-height: min(980px, max(780px,100svh));
    padding: 155px 28px 65px;
    background: radial-gradient(ellipse at 18% 16%,#594d9166,transparent 48%),
                radial-gradient(ellipse at 85% 20%,#2b647a55,transparent 44%), #141c34;
    overflow: hidden;
}
.home-portal .hero-bg { mask-image: linear-gradient(#000, #0008 65%, transparent); }
.home-portal .hero-aurora { opacity: .35; }
.home-portal .hero-content { max-width: 1360px; }
.home-portal .hero-badge { background: #34425b; border-color: #95a5cc; color: #e1eaff; font-size: .71rem; box-shadow: none; }
.home-portal .hero-title { font-size: clamp(3.2rem,6.6vw,6.2rem); line-height: 1.02; letter-spacing: -.025em; margin-top: 25px; }
.home-portal .hero-title-accent { background: linear-gradient(95deg,#ffda91,#f4b9d2 45%,#a9c6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-portal .hero-subtitle { font-size: clamp(1rem,1.7vw,1.25rem); color: #d4dff5; margin-top: 25px; }
.home-portal .hero-quote { color: #b2c1da; font-size: .95rem; margin: 15px auto 28px; }
.home-portal .btn-hero { background: linear-gradient(110deg,#8b7bd6,#4d86bb); border: 1px solid #b8b3ff; border-bottom: 4px solid #485692; border-radius: 15px; box-shadow: 0 5px 0 #0d163055; font-size: .9rem; padding: 17px 28px; }
.home-portal .home-explore-label { margin: 37px 0 15px; font-size: .56rem; font-weight: 900; letter-spacing: .18em; color: #afbed6; }
.home-portal .hero-worlds { max-width: 1060px; width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 0 auto; align-items: stretch; }
.home-portal .world-preview {
    --preview: #f4d178;
    min-width: 0;
    padding: 21px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid #73829f88;
    border-top: 2px solid var(--preview);
    background: linear-gradient(155deg,#2a3553,#1c2742);
    border-radius: 23px 23px 23px 9px;
}
.home-portal .wp-primaria { --preview: #ffae75; }
.home-portal .wp-secundaria { --preview: #b2a1ff; }
.home-portal .wp-recursos { --preview: #8dd9c0; }
.home-portal .wp-orb { width: 90px; height: 90px; margin-bottom: 5px; background: #18253c; border: 1px solid #9dacc166; box-shadow: none; }
.home-portal .wp-robot-img { max-width: 90%; max-height: 90%; object-fit: contain; }
.home-portal .wp-teacher-icon { font-size: 2.5rem; }
.home-portal .wp-label { color: var(--preview); font-size: .85rem; letter-spacing: .08em; }
.home-portal .wp-stage { color: #c5d1e7; font-size: .52rem; white-space: normal; line-height: 1.5; text-align: center; margin-top: 0; }
.home-portal .world-preview:hover .wp-orb { box-shadow: none; }
.home-portal .hero .scroll-hint { position: relative; bottom: auto; left: auto; transform: none; margin: 32px auto 0; opacity: .7; }

/* El color cambia de forma continua en un único contenedor. */
.home-portal .home-journey {
    position: relative;
    background: linear-gradient(180deg,#141c34 0%,#1b2c3b 29%,#27263e 57%,#202440 77%,#18233a 100%);
}
.home-portal .home-journey::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(#b9c9e524 1px,transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(transparent,#0007 10%,#0007 90%,transparent);
}
.home-portal .transition {
    position: relative;
    height: 100px;
    margin: 0;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 20px 32px;
    overflow: hidden;
}
.home-portal .transition::before,.home-portal .transition::after { display: none; }
.home-portal .home-route-line { width: min(18vw,200px); height: 1px; background: linear-gradient(90deg,transparent,#8fabc05c,transparent); }
.home-portal .home-route-caption { display: flex; align-items: center; gap: 12px; font-size: .55rem; letter-spacing: .15em; font-weight: 900; text-align: center; color: #b7c5dc; }
.home-portal .home-route-caption i { width: 6px; height: 6px; background: #a3b4dd; border-radius: 50%; flex-shrink: 0; }
.home-portal .world { background: none; color: #e9f0ff; min-height: 650px; padding: 35px 40px 55px; overflow: hidden; }
.home-portal .world-content { max-width: 1380px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 65px; }
.home-portal .world-inicial { --world-accent: #f4cf69; --world-soft: #3c4635; }
.home-portal .world-primaria { --world-accent: #ffb076; --world-soft: #483b40; }
.home-portal .world-secundaria { --world-accent: #aaa6ff; --world-soft: #353651; }
.home-portal .robot-stage {
    min-height: 480px;
    padding: 50px 25px 25px;
    border: 1px solid #a7bfd859;
    border-radius: 46% 46% 32px 32px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 8px 0 #0a142633;
}
.home-portal .robot-stage .world-bg { z-index: -1; }
.home-portal .garden-bg { background: linear-gradient(#a5d9e3,#dfebbc 65%,#90c17e); }
.home-portal .city-bg { background: linear-gradient(#b0c9e9,#bdb5dc 60%,#7b9bbd); }
.home-portal .cyber-bg { background: radial-gradient(ellipse at 60% 30%,#5c4291,#152b55 65%); }
.home-portal .robot-stage .layer-sky { opacity: .65; }
.home-portal .robot-stage .layer-deco { opacity: .75; }
.home-portal .home-stage-label {
    position: absolute;
    left: 50%;
    top: 28px;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 35px);
    padding: 10px 15px;
    border-radius: 10px;
    background: #1a2945e8;
    border: 1px solid #ccdffb80;
    color: #f2f3ff;
    z-index: 4;
    font-size: .58rem;
    letter-spacing: .09em;
    font-weight: 900;
    text-align: center;
}
.home-portal .robot-display { width: 100%; max-width: 360px; }
.home-portal .robot-img { filter: drop-shadow(0 12px 0 #14213228); }
.home-portal .robot-portal { width: 360px; height: 360px; }
.home-portal .robot-portal::before { opacity: .5; }
.home-portal .robot-platform { filter: none; background: #19314a26; height: 38px; }
.home-portal .world-card {
    padding: 30px 34px;
    background: linear-gradient(150deg,var(--world-soft),#202d46 75%);
    border: 1px solid #b3c6df55;
    border-top: 3px solid var(--world-accent);
    border-radius: 26px 26px 26px 10px;
    box-shadow: 0 6px 0 #0b172933;
    color: #edf2ff;
    backdrop-filter: none;
}
.home-portal .world-card::before { display: none; }
.home-portal .hud-dot { background: var(--world-accent); box-shadow: none; }
.home-portal .hud-line { background: linear-gradient(90deg,#afc0dc44,transparent); }
.home-portal .hud-level { color: var(--world-accent); background: #101e3344; border: 1px solid #d2d7e544; padding: 6px 10px; font-size: .61rem; }
.home-portal .card-level { padding: 6px 10px; background: #14213877; color: var(--world-accent); border: 1px solid #becae033; box-shadow: none; font-size: .63rem; margin-bottom: 14px; }
.home-portal .card-title { font-size: clamp(2rem,3.3vw,3rem); line-height: 1.06; margin-bottom: 18px; }
.home-portal .card-title-main { color: #bdc9dc; font-size: .4em; letter-spacing: .09em; margin-bottom: 10px; }
.home-portal .card-title-accent { color: var(--world-accent); background: none; -webkit-text-fill-color: currentColor; text-shadow: none; }
.home-portal .card-desc { color: #cdd8e9; font-size: .88rem; line-height: 1.85; }
.home-portal .tag-list { gap: 7px; margin: 20px 0; }
.home-portal .tag { color: #d9e2ef; background: #12223a66; border: 1px solid #8ea1bc44; box-shadow: none; font-size: .67rem; }
.home-portal .btn-world { width: 100%; justify-content: center; padding: 15px 18px; border: 1px solid #e2eff34d; border-bottom: 4px solid #12203c55; border-radius: 13px; background: var(--world-accent); color: #243149; font-size: .83rem; box-shadow: none; }
.home-portal .btn-world .btn-glow { display: none; }
.home-portal .card-stats { border-color: #b6c8e433; margin-top: 22px; padding-top: 17px; }
.home-portal .stat-num { color: var(--world-accent); font-size: 1.2rem; }
.home-portal .stat-lbl { color: #a7bbd1; font-size: .59rem; }
.home-portal .stat-sep { background: #afc4dc33; }

/* Del último mundo al aula y al propósito: extremos del mismo color. */
.home-portal .recursos { background: linear-gradient(#18233a,#172138); padding: 70px 32px; overflow: hidden; }
.home-portal .recursos::before { opacity: .25; mask-image: linear-gradient(transparent,#000,transparent); }
.home-portal .recursos-inner,.home-portal .about-inner { max-width: 1380px; }
.home-portal .section-header { margin-bottom: 35px; }
.home-portal .section-eyebrow { color: #9ed9ca; font-size: .66rem; letter-spacing: .15em; }
.home-portal .section-title { color: #edf2ff; background: none; -webkit-text-fill-color: currentColor; font-size: clamp(1.8rem,3vw,2.6rem); }
.home-portal .section-subtitle { color: #bccae1; font-size: .91rem; line-height: 1.8; }
.home-portal .recursos-grid { display: grid; max-width: none; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; align-items: stretch; }
.home-portal .resource-card { padding: 30px 25px 25px; background: linear-gradient(145deg,#293b51,#222f47); border: 1px solid #8da8bc66; border-radius: 22px; box-shadow: 0 5px 0 #0b172733; }
.home-portal .resource-card::before { height: 3px; background: #96caba; }
.home-portal .resource-icon { width: 78px; height: 78px; border-radius: 22px; box-shadow: none; }
.home-portal .resource-icon-wrap { margin-bottom: 20px; }
.home-portal .resource-title { color: #eff4ff; font-size: 1.45rem; }
.home-portal .resource-desc { color: #c1cee2; font-size: .86rem; line-height: 1.8; min-height: 0; margin-bottom: 25px; }
.home-portal .btn-resource { background: #637faa; border: 1px solid #a7bbd5; border-bottom: 4px solid #395b7a; border-radius: 12px; box-shadow: none; font-size: .82rem; }
.home-portal .resource-card-robots:hover .btn-resource-robots { box-shadow: none; }
.home-portal .about { background: linear-gradient(#172138,#131b30); padding: 65px 32px 70px; }
.home-portal .about .section-title { color: #edf2ff; }
.home-portal .about .section-subtitle { color: #bccae1; }
.home-portal .about .section-eyebrow { color: #bfb1e8; }
.home-portal .about-card { background: #24314a; border: 1px solid #778aa34d; box-shadow: none; border-radius: 20px; padding: 28px; }
.home-portal .about-title { color: #e5eefa; }
.home-portal .about-desc { color: #becee0; font-size: .86rem; line-height: 1.8; }
.home-portal .about-icon { box-shadow: none; width: 56px; height: 56px; border-radius: 17px; }
.home-portal .about-evolution { background: #202d46; border-color: #788fa34d; box-shadow: none; max-width: 680px; margin: 32px auto 0; }
.home-portal .site-footer { background: #131b30; border-top: 1px solid #7891b333; padding: 45px 32px 25px; }
.home-portal .site-footer::before { display: none; }
.home-portal .footer-inner { max-width: 1380px; margin: auto; }
.home-portal .footer-brand-txt { color: #e7ecff; background: none; -webkit-text-fill-color: currentColor; }
.home-portal .footer-msg { color: #b7c8dd; }
.home-portal .footer-list a { color: #b9cee4; }
.home-portal .footer-copy { text-align: center; color: #9eb4cc; font-size: .74rem; line-height: 1.8; }

@media (min-width: 1800px) {
    .home-portal .world-content { max-width: 1540px; gap: 95px; }
    .home-portal .world { min-height: 720px; }
    .home-portal .robot-stage { min-height: 540px; }
    .home-portal .robot-display { max-width: 410px; }
}
@media (max-width: 1200px) {
    .home-portal .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; flex: none; padding: 10px; background: #394b6e; border: 1px solid #93a7cb; border-radius: 12px; }
    .home-portal .menu-toggle span { width: 22px; height: 3px; margin: 0; background: #e2ecff; border-radius: 3px; }
    .home-portal .menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(8px) rotate(45deg); }
    .home-portal .menu-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
    .home-portal .menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-8px) rotate(-45deg); }
    .home-portal .main-nav { position: absolute!important; inset: calc(100% + 10px) 0 auto auto!important; width: min(440px,100%); max-height: calc(100dvh - 140px); padding: 13px; flex-direction: column; align-items: stretch; gap: 7px; display: none; background: #202d49; border: 1px solid #8ea6cd; border-bottom: 4px solid #5c7599; border-radius: 18px; overflow-y: auto; transform: none!important; opacity: 1!important; box-shadow: 0 7px 0 #09172d66; }
    .home-portal .main-nav.is-open {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: 56px;
        overscroll-behavior-y: contain;
        transition: none;
    }
    .home-portal .world-content { gap: 35px; }
    .home-portal .world-card { padding: 27px; }
}
@media (max-width: 1024px) {
    .home-portal .world-content { grid-template-columns: minmax(0,1fr) minmax(0,1fr); text-align: left; }
    .home-portal .robot-stage { order: 0; min-height: 410px; padding: 45px 15px 15px; }
    .home-portal .robot-display { max-width: 300px; }
    .home-portal .world-card { width: 100%; max-width: none; }
    .home-portal .tag-list { justify-content: flex-start; }
    .home-portal .recursos-grid { gap: 16px; }
    .home-portal .resource-card { padding: 25px 18px; }
}
@media (max-width: 800px) {
    .home-portal .world-content { grid-template-columns: minmax(0,1fr); max-width: 620px; gap: 26px; }
    .home-portal .robot-stage { min-height: 410px; width: 100%; }
    .home-portal .world { min-height: 0; padding: 20px 28px 30px; }
    .home-portal .robot-display { max-width: 300px; }
    .home-portal .transition { height: 85px; gap: 12px; }
    .home-portal .recursos-grid { grid-template-columns: minmax(0,1fr); max-width: 620px; gap: 22px; }
    .home-portal .resource-card { padding: 30px; }
    .home-portal .about-grid { grid-template-columns: minmax(0,1fr); max-width: 620px; margin-inline: auto; }
    .home-portal .resource-desc { min-height: 0; }
    .home-portal .footer-top { grid-template-columns: minmax(0,1fr); text-align: center; gap: 30px; }
    .home-portal .footer-brand { justify-content: center; }
    .home-portal .footer-msg { margin-inline: auto; }
    .home-portal .footer-levels { justify-content: center; }
}
@media (max-width: 550px) {
    .home-portal .site-header { inset: 9px 10px auto; border-radius: 18px; }
    .home-portal .header-inner { min-height: 74px; padding: 10px 12px; gap: 10px; }
    .home-portal .brand { gap: 8px; }
    .home-portal .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
    .home-portal .brand-name { font-size: .82rem; }
    .home-portal .brand-tagline { font-size: .5rem; max-width: 155px; }
    .home-portal .sound-toggle { top: 102px; right: 14px; width: 40px; height: 40px; }
    .home-portal .hero { min-height: 0; padding: 150px 20px 35px; }
    .home-portal .hero-title { font-size: clamp(2.2rem,9.5vw,3.6rem); }
    .home-portal .hero-badge { font-size: .58rem; padding: 8px 12px; }
    .home-portal .hero-subtitle { font-size: .88rem; line-height: 1.8; }
    .home-portal .hero-quote { font-size: .83rem; max-width: 280px; line-height: 1.7; }
    .home-portal .btn-hero { font-size: .75rem; gap: 10px; padding: 15px 20px; }
    .home-portal .home-explore-label { font-size: .49rem; margin-top: 30px; }
    .home-portal .hero-worlds { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .home-portal .world-preview { padding: 16px 8px; gap: 8px; border-radius: 18px 18px 18px 8px; }
    .home-portal .wp-orb { width: 75px; height: 75px; }
    .home-portal .wp-label { font-size: .73rem; }
    .home-portal .wp-stage { font-size: .45rem; }
    .home-portal .hero .scroll-hint { display: none; }
    .home-portal .world { padding: 10px 18px 20px; }
    .home-portal .transition { padding: 15px 18px; height: 75px; gap: 10px; }
    .home-portal .home-route-caption { font-size: .43rem; letter-spacing: .06em; gap: 7px; }
    .home-portal .home-route-caption i { width: 4px; height: 4px; }
    .home-portal .home-route-line { width: 10vw; }
    .home-portal .robot-stage { min-height: 340px; padding-top: 45px; }
    .home-portal .robot-display { max-width: 240px; }
    .home-portal .robot-portal { width: 270px; height: 270px; }
    .home-portal .home-stage-label { font-size: .5rem; padding: 8px 12px; top: 24px; }
    .home-portal .world-card { padding: 25px 22px; border-radius: 21px; }
    .home-portal .card-title { font-size: 2.2rem; }
    .home-portal .card-desc { font-size: .83rem; }
    .home-portal .card-hud { gap: 7px; }
    .home-portal .hud-level { font-size: .54rem; min-width: 0; white-space: normal; text-align: center; }
    .home-portal .tag { font-size: .62rem; }
    .home-portal .btn-world { font-size: .75rem; }
    .home-portal .recursos,.home-portal .about { padding: 45px 18px; }
    .home-portal .resource-card { padding: 27px 23px; }
    .home-portal .section-subtitle { font-size: .83rem; }
    .home-portal .site-footer { padding: 35px 18px 22px; }
    .home-portal .footer-nav { gap: 20px; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .home-portal *, .home-portal *::before, .home-portal *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}

/* Recursos docentes: mismo visor y control lateral de los juegos. */
.home-portal.teacher-resource-open { overflow: hidden; }
.home-portal.teacher-resource-open #soundToggle { display: none; }
.home-portal .teacher-viewer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: block;
    z-index: 1000000;
    background: #111a2d;
    overscroll-behavior: contain;
}
.home-portal .teacher-viewer[hidden],
.home-portal .teacher-exit-panel[hidden] { display: none!important; }
.home-portal .teacher-viewer:fullscreen { width: 100%; height: 100%; }
.home-portal .teacher-viewer:-webkit-full-screen { width: 100%; height: 100%; }
.home-portal #teacherFrame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.home-portal .teacher-exit-tab {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 3;
    width: 28px;
    height: 56px;
    padding: 0;
    border: 1px solid #b6cee299;
    border-left: 0;
    border-radius: 0 12px 12px 0;
    background: #243c54df;
    color: #fff;
    font: 900 26px/1 'Nunito',sans-serif;
    cursor: grab;
    touch-action: none;
    user-select: none;
    opacity: .8;
}
.home-portal .teacher-exit-tab:hover,
.home-portal .teacher-exit-tab:focus-visible,
.home-portal .teacher-exit-tab[aria-expanded='true'] { opacity: 1; background: #385b78; }
.home-portal .teacher-exit-tab:active { cursor: grabbing; }
.home-portal .teacher-exit-panel {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: min(380px,calc(100% - 36px));
    max-height: calc(100% - 32px);
    overflow-y: auto;
    padding: 26px;
    border: 1px solid #aac9da;
    border-top: 3px solid #91d9c4;
    border-radius: 22px;
    background: #202e46;
    color: #eef5ff;
    text-align: center;
    box-shadow: 0 0 0 100vmax #07132599;
}
.home-portal .teacher-panel-kicker { display: block; font-size: .57rem; letter-spacing: .12em; font-weight: 900; color: #a4d9cd; margin-bottom: 12px; }
.home-portal .teacher-exit-panel h2 { font: 600 1.45rem 'Fredoka',sans-serif; color: #eff7ff; line-height: 1.35; margin: 0 0 10px; }
.home-portal .teacher-exit-panel p { margin: 0 0 22px; color: #bfcee1; font-size: .83rem; line-height: 1.7; }
.home-portal .teacher-exit-actions { display: flex; flex-direction: column; gap: 10px; }
.home-portal .teacher-exit-actions button {
    min-height: 45px;
    padding: 12px;
    border: 1px solid #8da5c8;
    border-bottom: 3px solid #58718f;
    border-radius: 11px;
    background: #344b69;
    color: #f0f7ff;
    font: 800 .8rem 'Nunito',sans-serif;
    cursor: pointer;
}
.home-portal #teacherFullscreen { background: #9bcacb; color: #17334a; border-color: #c6e5e4; border-bottom-color: #69999d; }
.home-portal #teacherClose { background: #946c84; border-color: #c9a2ba; border-bottom-color: #705066; }
@media (max-height: 430px) {
    .home-portal .teacher-exit-panel { padding: 18px; }
    .home-portal .teacher-exit-panel p { margin-bottom: 12px; }
    .home-portal .teacher-exit-actions { gap: 7px; }
    .home-portal .teacher-exit-actions button { min-height: 39px; padding: 8px; }
}

/* ============================================================
   MUNDOS ABIERTOS · COLORES VIVOS Y ENLACES DE COLOR CONTINUOS
   Los escenarios vuelven a ocupar la sección completa.
   ============================================================ */
.home-portal .hero {
    background: radial-gradient(ellipse at 15% 15%,#9135c875,transparent 48%),
                radial-gradient(ellipse at 90% 35%,#167ad377,transparent 45%),
                linear-gradient(#341454,#21375b);
}
.home-portal .hero-aurora { opacity: .65; }
.home-portal .hero-title-accent { background-image: linear-gradient(100deg,#ffe24d,#ff9cba 50%,#72eaff); }
.home-portal .hero-badge { background: #473f86; border-color: #c4afff; color: #fff; }
.home-portal .btn-hero { background: linear-gradient(110deg,#ffe460,#ffb43e); color: #51331b; border-color: #fff09e; border-bottom-color: #c88c23; box-shadow: 0 5px 0 #172e4f; }
.home-portal .world-preview { background: linear-gradient(145deg,#483a79,#2b476a); border-color: #b5b9f17d; }
.home-portal .wp-inicial { --preview: #ffe34a; }
.home-portal .wp-primaria { --preview: #ffac53; }
.home-portal .wp-secundaria { --preview: #82edff; }
.home-portal .wp-recursos { --preview: #83f3c0; }
.home-portal .world-preview:hover { background: linear-gradient(145deg,#604da0,#3c6389); transform: translateY(-7px); }
.home-portal .wp-orb { border-color: var(--preview); background: #27365e; }
.home-portal .home-journey { background: none; }
.home-portal .home-journey::before { display: none; }
.home-portal .transition { height: clamp(140px,14vw,210px); }
.home-portal .transition-1 { background: linear-gradient(#21375b,#4c739a 30%,#8cbacf 68%,#b6eff7); }
.home-portal .transition-2 { background: linear-gradient(#9dda77,#b2df9a 28%,#bcdfe4 70%,#bfdafa); }
.home-portal .transition-3 { background: linear-gradient(#799bd4,#596fb0 30%,#343f7d 68%,#171d55); }
.home-portal .home-route-caption { background: #1a315675; color: #f0f6ff; padding: 11px 17px; border: 1px solid #c1dcff55; border-radius: 30px; }
.home-portal .home-route-line { background: linear-gradient(90deg,transparent,#dbf4ff99,transparent); }
.home-portal .world { min-height: 780px; padding: 65px 40px 85px; }
.home-portal .world-inicial { --world-accent: #efb91f; --world-soft: #fff6c8; background: linear-gradient(#b6eff7,#e3f5bc 55%,#9dda77); color: #2d563c; }
.home-portal .world-primaria { --world-accent: #ff932e; --world-soft: #fff0d5; background: linear-gradient(#bfdafa,#c4d2f4 52%,#799bd4); color: #243f65; }
.home-portal .world-secundaria { --world-accent: #69e8ff; --world-soft: #292955; background: radial-gradient(ellipse at 80% 40%,#7d30b34d,transparent 60%),linear-gradient(#171d55,#142a51 55%,#101c3d); color: #f1f2ff; }
.home-portal .world > .world-bg { position: absolute; inset: 0; z-index: 0; border-radius: 0; background: none; }
.home-portal .world > .world-bg .layer-sky { opacity: .9; }
.home-portal .world > .world-bg .layer-deco { opacity: .8; }
.home-portal .world-content { max-width: 1420px; gap: 75px; }
.home-portal .robot-stage {
    min-height: 540px;
    padding: 30px 0 55px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: none;
    box-shadow: none;
    isolation: auto;
    cursor: pointer;
}
.home-portal .robot-stage::after {
    content: attr(data-greeting);
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    width: max-content;
    max-width: 95%;
    padding: 9px 16px;
    border-radius: 20px;
    border: 1px solid #ffffffaa;
    background: #fff9e9ed;
    color: #40543c;
    font-size: .72rem;
    font-weight: 900;
    text-align: center;
}
.home-portal .world-secundaria .robot-stage::after { background: #202d52; border-color: #98c5f5; color: #a9eeff; }
.home-portal .robot-stage .robot-display { max-width: 440px; width: 100%; }
.home-portal .robot-stage .robot-img { filter: drop-shadow(0 12px 0 #18284025); }
.home-portal .robot-stage:hover .robot-img { filter: drop-shadow(0 14px 0 #18284035) saturate(1.12); }
.home-portal .robot-stage.is-greeting .robot-img { animation: homeRobotGreeting .65s ease-in-out; }
@keyframes homeRobotGreeting { 0%,100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-22px) rotate(-6deg); } 70% { transform: translateY(-8px) rotate(6deg); } }
.home-portal .robot-platform { bottom: 11%; height: 35px; width: 70%; background: #173c5933; border: 0; box-shadow: none; animation: none; }
.home-portal .world-primaria .robot-platform { background: #274e7733; }
.home-portal .world-secundaria .robot-platform { background: #36ccf533; border: 1px solid #7eeaff88; }
.home-portal .world-inicial .world-card,
.home-portal .world-primaria .world-card { background: linear-gradient(145deg,#fffef5,var(--world-soft)); border: 2px solid var(--world-accent); border-bottom-width: 6px; color: #2b4560; box-shadow: 0 8px 0 #234e6a1c; }
.home-portal .world-inicial .card-title-accent { color: #b97b06; }
.home-portal .world-primaria .card-title-accent { color: #db6518; }
.home-portal .world-inicial .card-title-main,
.home-portal .world-primaria .card-title-main { color: #42627a; }
.home-portal .world-inicial .card-desc,
.home-portal .world-primaria .card-desc { color: #4c6575; }
.home-portal .world-inicial .hud-level,
.home-portal .world-primaria .hud-level { color: #6f5421; background: #ffdf9238; border-color: #daba65; }
.home-portal .world-inicial .tag,
.home-portal .world-primaria .tag { color: #38566b; background: #fffdf2; border-color: #b9c7b0; }
.home-portal .world-inicial .card-level,
.home-portal .world-primaria .card-level { color: #8c6016; background: #ffe6a0; border-color: #e7bb58; }
.home-portal .world-inicial .stat-num { color: #9d7212; }
.home-portal .world-primaria .stat-num { color: #c45b17; }
.home-portal .world-inicial .stat-lbl,
.home-portal .world-primaria .stat-lbl { color: #536c71; }
.home-portal .world-inicial .card-stats,
.home-portal .world-primaria .card-stats { border-color: #9fae9a55; }
.home-portal .world-inicial .hud-line,
.home-portal .world-primaria .hud-line { background: linear-gradient(90deg,#9caa9b66,transparent); }
.home-portal .world-inicial .stat-sep,
.home-portal .world-primaria .stat-sep { background: #9caa9b55; }
.home-portal .world-secundaria .world-card { background: linear-gradient(140deg,#342b63ed,#142e4eed); border: 2px solid #81d1ef; border-bottom-width: 5px; box-shadow: 0 0 35px #46cbff22; }
.home-portal .btn-world { color: #283342; border-bottom-color: #aa6a2455; transition: transform .2s,filter .2s; }
.home-portal .btn-world:hover { transform: translateY(-4px); filter: brightness(1.1); box-shadow: 0 5px 0 #193d6d22; }
.home-portal .world-primaria .btn-world { color: #54270b; background: #ffad43; }
.home-portal .world-inicial .btn-world { background: #fcd849; }
.home-portal .world-secundaria .btn-world { background: linear-gradient(100deg,#7feeff,#b9a1ff); }
.home-portal .world-inicial .sun { width: 115px; height: 115px; box-shadow: 0 0 55px #ffe96e77; }
.home-portal .world-primaria .city-sun { background: linear-gradient(#ffea70,#ffac5b); box-shadow: 0 0 45px #ffc54d55; }
.home-portal .world-primaria .city-skyline-front { opacity: .8; }
.home-portal .world-primaria .layer-ground { opacity: .65; }
.home-portal .world-primaria::after { content: ''; position: absolute; bottom: 5%; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(90deg,#ffe99e 0 55px,transparent 55px 110px); opacity: .7; pointer-events: none; }
.home-portal .home-binary-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; mask-image: linear-gradient(#0008,#000 40%,transparent); }
.home-portal .home-binary-field span { position: absolute; left: var(--x); top: -250px; writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .7em; color: #6ff4ff; opacity: .3; font: 700 14px/1.6 monospace; animation: homeBinaryFall 17s linear var(--delay) infinite; }
@keyframes homeBinaryFall { to { transform: translateY(1150px); } }
.home-portal .recursos { background: linear-gradient(#101c3d,#20315b); }
.home-portal .resource-card { background: linear-gradient(145deg,#304f7c,#343366); border-color: #94a9ea; border-top: 3px solid #69d9f5; }
.home-portal .resource-card:nth-child(2) { background: linear-gradient(145deg,#663f88,#343764); border-top-color: #f6b5ee; }
.home-portal .resource-card:nth-child(3) { background: linear-gradient(145deg,#245e6d,#303b69); border-top-color: #85f0d2; }
.home-portal .resource-card .btn-resource { background: linear-gradient(110deg,#7479ef,#488fc9); border-color: #b7c8ff; border-bottom-color: #434c9c; }
.home-portal .resource-card:hover { transform: translateY(-7px); box-shadow: 0 8px 0 #0b173033; }
.home-portal .about { background: linear-gradient(#20315b,#161e3a); }
.home-portal .about-card { background: linear-gradient(145deg,#3b477a,#293a60); border-color: #a79bd777; }
.home-portal .about-card::before { height: 4px; }
.home-portal .site-footer { background: #161e3a; }
@media (min-width: 1800px) {
    .home-portal .world { min-height: 850px; }
    .home-portal .robot-stage { min-height: 600px; }
    .home-portal .robot-stage .robot-display { max-width: 500px; }
}
@media (max-width: 1024px) {
    .home-portal .world { padding-inline: 28px; min-height: 680px; }
    .home-portal .world-content { gap: 30px; }
    .home-portal .robot-stage { min-height: 420px; }
    .home-portal .robot-stage .robot-display { max-width: 340px; }
}
@media (max-width: 800px) {
    .home-portal .world { min-height: 0; padding: 35px 24px 55px; }
    .home-portal .world-content { gap: 28px; }
    .home-portal .robot-stage { min-height: 370px; }
    .home-portal .robot-stage .robot-display { max-width: 300px; }
    .home-portal .transition { height: 125px; }
    .home-portal .world > .world-bg { opacity: .7; }
}
@media (max-width: 550px) {
    .home-portal .world { padding: 25px 18px 45px; }
    .home-portal .robot-stage { min-height: 315px; padding-bottom: 45px; }
    .home-portal .robot-stage .robot-display { max-width: 250px; }
    .home-portal .robot-stage::after { font-size: .63rem; bottom: 4px; }
    .home-portal .world-card { padding: 25px 22px; }
    .home-portal .home-route-caption { font-size: .43rem; padding: 9px 12px; }
    .home-portal .transition { height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-portal .home-binary-field span { animation: none!important; top: 20%; }
    .home-portal .robot-stage.is-greeting .robot-img { animation: none!important; }
}

/* ============================================================
   NUEVOS ESCENARIOS · JARDÍN BOTÁNICO / AUTÓDROMO / LAB DIGITAL
   ============================================================ */
.home-portal .world-illustration {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.home-portal .world-illustration > svg { display: block; width: 100%; height: 100%; }
.home-portal .world-content { position: relative; z-index: 3; }
.home-portal .world-inicial { --world-accent: #efba21; --world-soft: #fff4b4; }
.home-portal .world-inicial .world-card {
    background: linear-gradient(145deg,#fffef1,#fff3b0);
    border: 3px solid #e6ba36;
    border-bottom: 8px solid #c89328;
    border-radius: 35px 35px 35px 12px;
    box-shadow: 8px 8px 0 #569c4c22;
}
.home-portal .world-inicial .card-level { background: #e5f6af; color: #377542; border: 1px solid #8fbb52; border-radius: 10px; }
.home-portal .world-inicial .tag { border-color: #bdcb76; background: #ffffee; color: #466540; }
.home-portal .world-inicial .card-title-accent { color: #96630b; }
.home-portal .world-inicial .btn-world { background: linear-gradient(110deg,#ffe74e,#ffc331); border: 2px solid #f6b820; border-bottom: 5px solid #cb901d; border-radius: 15px; color: #6d480e; }
.home-portal .world-inicial .robot-platform { display: none; }
.home-portal .world-inicial .robot-stage::after { background: #fffdd1; border: 2px solid #d0b84d; color: #6f691e; }
.home-portal .world-primaria .world-card {
    background: linear-gradient(135deg,#fff9e9,#e5f0ff);
    border: 3px solid #ff9b3b;
    border-bottom: 8px solid #db702d;
    border-radius: 12px 30px 12px 30px;
    box-shadow: 8px 8px 0 #41639d22;
}
.home-portal .world-primaria .world-card::before {
    content: '';
    display: block;
    position: absolute;
    inset: 0 0 auto;
    height: 10px;
    border-radius: 0;
    background: repeating-linear-gradient(90deg,#28416c 0 14px,#fff2c7 14px 28px);
}
.home-portal .world-primaria .card-hud { margin-top: 6px; }
.home-portal .world-primaria .card-level { background: #23416b; border: 1px solid #546f99; color: #ffc368; border-radius: 6px; }
.home-portal .world-primaria .card-title-accent { color: #d45a19; font-family: 'Nunito',sans-serif; font-weight: 900; font-style: italic; }
.home-portal .world-primaria .tag { background: #edf4ff; border-color: #9eb6dc; color: #335583; border-radius: 8px; }
.home-portal .world-primaria .btn-world { background: linear-gradient(110deg,#ffb548,#ff8c37); color: #58270c; border: 2px solid #ef9031; border-bottom: 5px solid #c76b2b; border-radius: 8px; }
.home-portal .world-primaria .robot-platform { display: none; }
.home-portal .world-primaria::after { display: none; }
.home-portal .world-primaria .robot-stage::after { background: #233f69; border: 2px solid #ffb94d; color: #ffe5a8; border-radius: 8px; }
.home-portal .world-secundaria .world-card {
    background: linear-gradient(135deg,#392267f2,#142954f2);
    border: 2px solid #72eaff;
    border-right: 3px solid #d781ff;
    border-bottom: 6px solid #7958c5;
    border-radius: 8px 28px 8px 28px;
    box-shadow: 7px 7px 0 #0c153955;
}
.home-portal .world-secundaria .world-card::before { display: block; height: 3px; background: linear-gradient(90deg,#5defff,#e26dff,#5defff); }
.home-portal .world-secundaria .card-level { background: #293878; color: #80f6ff; border: 1px solid #64d5f3; border-radius: 5px; font-family: monospace; }
.home-portal .world-secundaria .card-title-accent { color: #86f2ff; text-shadow: 3px 3px 0 #694fa3; font-family: 'Nunito',sans-serif; font-weight: 900; letter-spacing: -.03em; }
.home-portal .world-secundaria .tag { background: #40316a; border-color: #b38ce4; color: #eee1ff; border-radius: 6px; }
.home-portal .world-secundaria .btn-world { background: linear-gradient(100deg,#69efff,#b68eff); color: #20294c; border: 1px solid #b8fbff; border-bottom: 5px solid #7166b9; border-radius: 6px; }
.home-portal .world-secundaria .robot-platform { display: none; }
.home-portal .world-secundaria .robot-stage::after { background: #202550; border: 1px solid #b698ff; color: #a0f5ff; font-family: monospace; font-size: .67rem; border-radius: 5px; }
.home-portal .race-moving-dashes { animation: raceRoadFlow 6s linear infinite; }
@keyframes raceRoadFlow { to { stroke-dashoffset: -120; } }
.home-portal .lab-light-points { animation: labLightPulse 3s ease-in-out infinite; }
@keyframes labLightPulse { 50% { opacity: .35; } }
.home-portal .new-garden-butterfly { animation: gardenButterflyFlight 6s ease-in-out infinite; }
@keyframes gardenButterflyFlight { 50% { translate: 30px -18px; } }
.home-portal .world-inicial .robot-stage.is-greeting .robot-img { animation: gardenRobotHello .65s ease-in-out; }
@keyframes gardenRobotHello { 35% { transform: translateY(-26px) rotate(-7deg); } 70% { transform: translateY(-13px) rotate(7deg); } }
.home-portal .world-primaria .robot-stage.is-greeting .robot-img { animation: raceRobotHello .65s ease-in-out; }
@keyframes raceRobotHello { 25% { transform: translateX(-12px) rotate(-3deg); } 65% { transform: translateX(20px) rotate(3deg); } }
.home-portal .world-secundaria .robot-stage.is-greeting .robot-img { animation: labRobotHello .65s ease-in-out; }
@keyframes labRobotHello { 30% { transform: translateY(-24px) scale(1.04); } 60% { transform: translateY(-8px) scale(.98); } }

/* Barra cromática: botones de neón legibles incluso sin hover. */
.home-portal .site-header,
.home-portal .site-header.is-scrolled {
    background: linear-gradient(110deg,#462184f5,#27337bf5 58%,#114d70f5);
    border: 1px solid #a9a3ff;
    border-bottom: 4px solid #7655c5;
    box-shadow: 0 5px 0 #191c4a55;
}
.home-portal .brand-logo { background: linear-gradient(135deg,#ff72d0,#6b69f4); border-color: #ebc7ff; }
.home-portal .brand-tagline { color: #e3d4ff; }
.home-portal .nav-btn {
    --nav-bright: #bcc7ff;
    color: #f7f3ff;
    background: #4d3b87;
    border: 1px solid var(--nav-bright);
    border-bottom: 3px solid #c0a2e455;
}
.home-portal .nav-btn.nav-beebot { --nav-bright: #ffe36b; background: #65501f; color: #fff0a5; }
.home-portal .nav-btn.nav-rayet { --nav-bright: #ffac64; background: #714028; color: #ffe1b1; }
.home-portal .nav-btn.nav-ludio { --nav-bright: #7ceaff; background: #264b7a; color: #aef7ff; }
.home-portal .nav-btn.nav-recursos { --nav-bright: #82f6c7; background: #205a59; color: #b0ffe0; }
.home-portal .nav-btn.nav-ayuda { --nav-bright: #f0adff; background: #623d85; color: #fbdcff; }
.home-portal .nav-btn:hover,
.home-portal .nav-btn.is-active { border-color: var(--nav-bright); box-shadow: 0 0 12px color-mix(in srgb,var(--nav-bright) 30%,transparent); filter: brightness(1.2); }
.home-portal .nav-btn.nav-beebot.is-active { background: #ffe16a; color: #5d4009; }
.home-portal .nav-btn.nav-rayet.is-active { background: #ffa64c; color: #56290b; }
.home-portal .nav-btn.nav-ludio.is-active { background: #6be6ff; color: #173a61; }
.home-portal .nav-btn.nav-recursos.is-active { background: #6de9ba; color: #15433a; }
.home-portal .home-professor-nav { width: 32px; height: 32px; }
.home-portal .sound-toggle { background: #34317c; border: 1px solid #87ecff; color: #b8faff; border-bottom: 3px solid #6387c5; }
.home-portal .wp-teacher-icon { background: linear-gradient(135deg,#4d638b,#3e5278); border-color: #7affd2; }
.home-portal .wp-orb .professor-preview { width: 90%; height: 90%; max-width: 90%; max-height: 90%; object-fit: contain; }
.home-portal .teacher-section-mascot { display: block; width: 125px; height: 125px; object-fit: contain; margin: 0 auto 18px; }

/* Los recursos se distinguen por tres paletas vivas y botones sólidos. */
.home-portal .recursos { background: radial-gradient(ellipse at 15% 45%,#6338a455,transparent 55%),linear-gradient(#101c3d,#20315b); }
.home-portal .recursos .section-eyebrow { color: #82f5ce; }
.home-portal .resource-card {
    --resource-bright: #69e9ff;
    background: linear-gradient(140deg,#4536b2,#283f8b);
    border: 2px solid var(--resource-bright);
    border-bottom: 6px solid #5477c1;
    border-radius: 25px 25px 25px 8px;
    box-shadow: 6px 6px 0 #0e184133;
}
.home-portal .resource-card:nth-child(2) { --resource-bright: #ffc46a; background: linear-gradient(140deg,#9d297a,#5b329b); border-top-color: var(--resource-bright); border-bottom-color: #bd71ae; }
.home-portal .resource-card:nth-child(3) { --resource-bright: #7affca; background: linear-gradient(140deg,#146880,#254fa0); border-top-color: var(--resource-bright); border-bottom-color: #48a8b2; }
.home-portal .resource-card::before { background: var(--resource-bright); height: 4px; }
.home-portal .resource-icon { background: var(--resource-bright); color: #173356; border: 2px solid #ffffff88; box-shadow: 0 5px 0 #111c5b55; border-radius: 23px; }
.home-portal .resource-icon svg { stroke: currentColor; }
.home-portal .resource-title { color: #fff; font-size: 1.5rem; }
.home-portal .resource-desc { color: #f0ebff; }
.home-portal .resource-card .btn-resource { background: var(--resource-bright); color: #17334d; border: 1px solid #ffffff99; border-bottom: 5px solid #172c6a55; border-radius: 12px; box-shadow: none; font-weight: 900; }
.home-portal .resource-card:hover { box-shadow: 7px 10px 0 #0c173f44; }
.home-portal .resource-card .btn-resource:hover { filter: brightness(1.12); transform: translateY(-3px); }
.home-portal .resource-card-robots:hover .btn-resource-robots { box-shadow: none; }
@media (max-width: 1200px) {
    .home-portal .main-nav { background: linear-gradient(145deg,#3c2869,#183e65); border-color: #b5a3f6; }
    .home-portal .main-nav .nav-btn { color: #f5f2ff; }
    .home-portal .main-nav .nav-btn.is-active { color: #1b314d; }
    .home-portal .menu-toggle { background: #6242a0; border-color: #cba7ff; }
}
@media (max-width: 550px) {
    .home-portal .world-illustration svg { width: 180%; max-width: none; margin-left: -25%; }
    .home-portal .resource-title { font-size: 1.35rem; }
    .home-portal .teacher-section-mascot { width: 100px; height: 100px; }
    .home-portal .world-secundaria .robot-stage::after { font-size: .58rem; }
}
@media (prefers-reduced-motion: reduce) {
    .home-portal .world-illustration *,
    .home-portal .robot-stage.is-greeting .robot-img { animation: none!important; }
}

.home-portal .wp-inicial { background: linear-gradient(140deg,#52783b,#246e65); border-color: #f4dc69; }
.home-portal .wp-primaria { background: linear-gradient(140deg,#83452c,#713c8d); border-color: #ffac63; }
.home-portal .wp-secundaria { background: linear-gradient(140deg,#5941ac,#175f92); border-color: #70e9ff; }
.home-portal .wp-recursos { background: linear-gradient(140deg,#2b5f99,#18756b); border-color: #7cface; }
.home-portal .world-preview .wp-stage { color: #eff5ff; }
.home-portal .resource-card .resource-icon { background: var(--resource-bright); color: #173356; }
/* Las ilustraciones se funden con los extremos exactos de cada degradado. */
.home-portal .world-illustration {
    mask-image: linear-gradient(transparent,#000 10%,#000 87%,transparent);
    -webkit-mask-image: linear-gradient(transparent,#000 10%,#000 87%,transparent);
}

/* YachayAventura: una paleta opaca compartida por navegación y tarjetas. */
.home-portal .nav-inicio { --tile: #54658f; --tile-edge: #dce5ff; }
.home-portal :is(.nav-beebot,.wp-inicial,.world-inicial) { --tile: #ffdf8a; --tile-edge: #9c600e; --tile-text: #402708; --tile-accent: #603604; --tile-button: #a45c0b; }
.home-portal :is(.nav-rayet,.wp-primaria,.world-primaria) { --tile: #273745; --tile-edge: #ffab58; --tile-text: #f7f9fc; --tile-button: #ffab58; --button-text: #35210b; }
.home-portal :is(.nav-ludio,.wp-secundaria,.world-secundaria) {
    --tile: linear-gradient(145deg, #13172e 20%, #251744 100%);
    --tile-edge: #55f5ff;
    --tile-text: #f4f5ff;
    --tile-button: #55f5ff;
    --button-text: #101830;
}
.home-portal :is(.nav-recursos,.wp-recursos) { --tile: #356b75; --tile-edge: #9af1cd; }
.home-portal .nav-ayuda { --tile: #604580; --tile-edge: #e3b4ff; }
.home-portal .main-nav .nav-btn {
    box-sizing: border-box; flex: 0 0 116px; width: 116px; height: 56px;
    min-height: 56px; padding: 10px; justify-content: center;
}
.home-portal .main-nav .nav-btn,
.home-portal .main-nav .nav-btn:hover,
.home-portal .main-nav .nav-btn.is-active {
    background: var(--tile); color: var(--tile-text, #fff); border: 2px solid var(--tile-edge);
    border-bottom-width: 4px; border-radius: 14px; opacity: 1;
    filter: none; text-shadow: none; box-shadow: none; backdrop-filter: none;
}
.home-portal .main-nav .nav-btn.is-active { box-shadow: inset 0 0 0 2px var(--tile-edge); }
.home-portal .main-nav .nav-btn :is(.home-nav-robot,.nav-btn-ico) {
    width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center;
}
.home-portal .world-preview,
.home-portal .world-preview:hover,
.home-portal .world .world-card {
    background: var(--tile); border: 2px solid var(--tile-edge);
    border-bottom-width: 5px; color: var(--tile-text, #fff); opacity: 1; filter: none; backdrop-filter: none;
}
.home-portal .world-preview .wp-orb { background: #293554; border: 2px solid var(--tile-edge); }
.home-portal .world-preview .wp-label { color: var(--tile-accent, var(--tile-edge)); text-shadow: none; }
.home-portal .world-preview .wp-stage { color: var(--tile-text, #fff); text-shadow: none; }
.home-portal .world .world-card :is(.card-title,.card-title-main,.card-desc,.stat-lbl) { color: var(--tile-text); }
.home-portal .world .world-card :is(.card-title-accent,.stat-num) { color: var(--tile-accent, var(--tile-edge)); text-shadow: none; }
.home-portal .world .world-card::before { display: none; }
.home-portal .world .btn-world,
.home-portal .world .btn-world:hover {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    width: 100%; max-width: 320px; height: 68px; min-height: 68px; padding: 10px 16px;
    background: var(--tile-button); color: var(--button-text, #fff); border: 2px solid var(--tile-edge);
    border-bottom-width: 5px; border-radius: 14px; font-size: 1rem;
    opacity: 1; filter: none; text-shadow: none; box-shadow: none;
}
.home-portal .world .btn-world::before,
.home-portal .world .btn-world::after,
.home-portal .world .btn-world .btn-glow { display: none; }
.home-portal .hero-title { font-size: clamp(2rem,6.6vw,6.2rem); }
.home-portal .hero-quote {
    max-width: 680px; margin: 18px auto 20px; color: #e0e7f5;
    font-size: clamp(.95rem,1.3vw,1.08rem); line-height: 1.75; font-style: normal;
}
.home-portal .development-team { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 20px 0; color: #dce5ff; font-size: .8rem; }
@media (max-width: 1200px) {
    .home-portal .main-nav .nav-btn { flex: 0 0 56px; width: 100%; height: 56px; min-height: 56px; justify-content: flex-start; padding: 10px 15px; }
}
@media (max-width: 700px) {
    .home-portal .development-team { align-items: center; }
}

/* LAN Studio: identidad integrada, sin tarjetas ni fondos añadidos. */
.home-portal .brand-logo {
    width: 76px; height: 54px; display: flex; align-items: center;
    justify-content: center; flex: 0 0 76px; padding: 0;
    background: none; border: 0; border-radius: 0; box-shadow: none;
    overflow: visible;
}
.home-portal .brand-logo .brand-team-logo {
    display: block; width: 100%; height: 100%; object-fit: contain;
}
.home-portal .footer-brand { display: flex; align-items: center; gap: 14px; }
.home-portal .footer-brand-logo {
    display: flex; align-items: center; justify-content: center;
    width: 100px; height: 70px; flex: 0 0 100px;
    background: none; border: 0; border-radius: 0; box-shadow: none;
    padding: 0; overflow: visible;
}
.home-portal .footer-brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-portal .development-team {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 4px; margin: 18px 0; padding: 0 0 0 14px;
    border-left: 3px solid #79dfff; color: #edf3ff;
}
.home-portal .development-team-label { font-size: .75rem; color: #b8c8e2; }
.home-portal .development-team strong { font: 600 1.15rem 'Fredoka',sans-serif; letter-spacing: .03em; }
@media (max-width: 700px) {
    .home-portal .development-team { align-items: center; border-left: 0; padding: 0; }
    .home-portal .brand-logo { width: 64px; flex-basis: 64px; height: 46px; }
    .home-portal .footer-brand-logo { width: 80px; flex-basis: 80px; height: 56px; }
}

/* Detalles de cada mundo en sus accesos y tarjetas. */
.home-portal :is(.nav-beebot,.wp-inicial,.world-inicial) {
    --honeycomb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'%3E%3Cpath d='M0 0h10l10 17.3-10 17.4H0m60-34.7H50L40 17.3l10 17.4h10M20 17.3h20M10 34.7 20 52m30-17.3L40 52M20 0h20' fill='none' stroke='%23b97719' stroke-opacity='.24' stroke-width='1.3'/%3E%3C/svg%3E");
}
.home-portal .main-nav .nav-btn.nav-beebot,
.home-portal .world-preview.wp-inicial,
.home-portal .world-inicial .world-card { background-image: var(--honeycomb); }
.home-portal .wp-inicial .wp-orb { background: #fff1bf; }
.home-portal .world-inicial .world-card .hud-level { background: #fff2ce; color: #603604; }
.home-portal .world-primaria .world-card::before {
    display: block; height: 5px;
    background: repeating-linear-gradient(90deg, #ffab58 0 12px, #273745 12px 24px);
}
.home-portal .world-secundaria .world-card::before {
    display: block; height: 3px;
    background: linear-gradient(90deg, #55f5ff, #bd8cff, #ff68dc);
}
.home-portal .main-nav .nav-btn:hover,
.home-portal .main-nav .nav-btn:active { transform: none; }

/* Ludio: luces de circuito sobre superficies opacas. */
.home-portal .wp-secundaria .wp-orb {
    background: radial-gradient(circle, #2a1e50, #12172e 75%);
    box-shadow: 0 0 18px #55f5ff3d;
}
.home-portal .world-preview.wp-secundaria,
.home-portal .world-secundaria .world-card {
    border-bottom-color: #ff68dc;
    box-shadow: 0 0 24px #55f5ff33;
}
.home-portal .main-nav .nav-btn.nav-ludio:hover,
.home-portal .main-nav .nav-btn.nav-ludio.is-active {
    box-shadow: inset 0 0 0 1px #55f5ff, 0 0 12px #55f5ff55;
}
.home-portal .world-secundaria .world-card .hud-level {
    background: #211638;
    color: #fbb6ff;
    border-color: #ff68dc;
}
.home-portal .world-secundaria .btn-world,
.home-portal .world-secundaria .btn-world:hover {
    border-bottom-color: #a852d4;
    box-shadow: 0 0 16px #55f5ff55;
}

.home-portal .footer-partner-logo {
    display: block;
    width: min(360px, 100%);
    height: auto;
    margin: 0 auto 14px;
}
