/* Fichas y animación inspiradas en la primera actividad de primer grado. */
:root{--toy-shadow:#233052;--toy-blue:#4466ef;--toy-gold:#ffd24b;--world-accent:#8fcf78}
body{background-color:#fff8ea;background-image:radial-gradient(circle at 15% 15%,#ffedb9,transparent 35%),radial-gradient(circle at 90% 60%,#d2f3ff,transparent 35%)}
header{padding:9px 16px;border-bottom:5px solid #111e37}
header button{border:2px solid #ffffff50;background:#405577;box-shadow:0 4px 0 #0d1930;transition:transform .15s,box-shadow .15s}
header button:active{transform:translateY(4px);box-shadow:none}
main{max-width:1100px;padding-top:20px}
.intro{border:4px solid #fff;border-radius:34px;box-shadow:0 9px 0 #26325e25;min-height:260px}
.intro h2{font-weight:950;letter-spacing:-1px;text-shadow:0 4px 0 #17244360}
.hero-rocket{animation:rocket-flight 4s ease-in-out infinite}
.hero-earth{animation:planet-float 6s ease-in-out infinite}
.hero-flower{animation:flower-wave 3.5s ease-in-out infinite;transform-origin:50% 95%}
.goal .art{animation:star-sparkle 2.5s ease-in-out infinite}
#cards{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:24px}
.card{min-height:245px;border:4px solid #ffffffad;border-radius:30px;padding:22px 12px 16px;gap:12px;box-shadow:0 9px 0 #26325e35,inset 0 3px 0 #ffffff55;transition:transform .16s,box-shadow .16s}
.card .emoji{width:126px;height:126px;font-size:92px;border:4px solid #ffffff6e;background:#ffffffec;box-shadow:0 5px 0 #172c5022;overflow:visible}
.card .emoji .art{width:1.12em;height:1.12em}
.card .emoji img{animation:character-bob 4s ease-in-out infinite;filter:drop-shadow(0 5px 0 #18254118)}
.card:nth-child(3n) .emoji img{animation-delay:-1.3s}
.card:nth-child(3n+1) .emoji img{animation-delay:-2.6s}
.card b{font-size:27px;font-weight:950;letter-spacing:.2px;text-shadow:0 3px 0 #18254130}
.card small:last-child{font-size:19px;font-weight:850;padding:6px 17px;background:#122b4c59;border:2px solid #ffffff45;box-shadow:0 3px 0 #122b4c15}
@media(hover:hover){.card:hover{transform:translateY(-7px) rotate(-1.5deg);box-shadow:0 15px 0 #26325e25}.card:hover .emoji img{animation:character-wiggle .55s ease-in-out infinite alternate}.tile:not(:disabled):hover{border-color:#ffc12c;background-color:#fff6cb}}
.card:active{transform:translateY(7px);box-shadow:0 2px 0 #26325e35}
.world-pill{border:3px solid #cedcec;box-shadow:0 4px 0 #c2cede;transition:transform .15s;min-width:68px;background:#fff}
.world-pill[aria-pressed=true]{background:#4662cf;border-color:#263c98;box-shadow:0 4px 0 #263c98}
.world-pill:active{transform:translateY(4px)}
.gamebar{align-items:center;margin-bottom:0}
.gamebar h2{font-size:clamp(25px,4vw,36px);font-weight:950;margin:0}
#level{background:#ffd94e;border:3px solid #eeb72e;box-shadow:0 4px 0 #d49619;border-radius:16px;padding:6px 12px;font-size:20px}
#stars{display:flex;justify-content:center;gap:7px;padding:14px 0 10px;font-size:30px}
#stars>span{opacity:.2;filter:grayscale(1)}
#stars>span.earned{opacity:1;filter:none}
#stars>span.earned:last-of-type{animation:star-sparkle .55s ease-out}
.instruction{border:3px solid #ece4d4;border-radius:22px;padding:7px 12px;gap:10px;margin:8px 0 14px;box-shadow:0 5px 0 #e4dbc9}
.instruction p{flex:0 1 auto;font-size:20px;margin:0;white-space:nowrap}
.instruction button{background:#eef4ff;border:2px solid #d0ddf3;box-shadow:0 3px 0 #adbed8;flex:none}
.visual-help{border:0;background:transparent;flex:1;padding:0;margin:0;font-size:28px;white-space:nowrap;line-height:1.5;overflow:hidden}
.visual-help .art{margin:0 2px}
#world-banner{display:none!important}
#stage{position:relative;border:4px solid #bddcf2!important;border-radius:30px;background:linear-gradient(#e6f5ff,#fff)!important;box-shadow:0 9px 0 #84b8dc55,inset 0 4px 0 #ffffff88;min-height:450px;padding:22px;isolation:isolate;animation:board-arrive .22s ease-out}
#stage::before{content:'';position:absolute;inset:0;border-radius:26px;z-index:-1;pointer-events:none;background:radial-gradient(circle at 10% 8%,#fff 0 7%,transparent 7.5%),radial-gradient(circle at 90% 9%,#fff 0 5%,transparent 5.5%);opacity:.7}
#stage[data-game=memoria]{background:linear-gradient(#edeaff,#faf7ff)!important;border-color:#bcb1ee!important;box-shadow:0 9px 0 #9883d550}
#stage[data-game=jardin]{background:linear-gradient(#e4f8c2,#fcffed)!important;border-color:#9bc761!important;box-shadow:0 9px 0 #76a83d50}
body[data-world=bloques] #stage{background:linear-gradient(#dcf6c8,#faffec)!important;border-color:#a6d57b!important}
body[data-world=espacio] #stage{background:linear-gradient(#e5e5ff,#f9f6ff)!important;border-color:#bdb3ef!important}
body[data-world=dulces] #stage{background:linear-gradient(#ffedf6,#fff9fc)!important;border-color:#f1bbd3!important}
.target{display:table;margin:0 auto 18px;min-width:165px;background:#fff;border:5px solid #ffc84c;border-radius:25px;padding:8px 22px;font-size:58px;box-shadow:0 7px 0 #e5a62333}
.board{gap:16px;max-width:710px;margin:18px auto}
.tile{border:4px solid #d7c89e;border-radius:24px;background:#fff;box-shadow:0 7px 0 #d3c397;min-height:96px;min-width:80px;font-size:clamp(38px,5vw,64px);transition:background .15s,border-color .15s,box-shadow .15s;position:relative;overflow:visible}
.tile .art{width:1.27em;height:1.27em}
.tile:active:not(:disabled){translate:0 5px;box-shadow:0 2px 0 #d3c397}
.tile.selected{outline:4px solid #527bf0;outline-offset:2px;background:#e5eeff;border-color:#7896e5;box-shadow:0 7px 0 #5776bb}
.tile.done{background:#d5f8c9;border-color:#68c371;box-shadow:0 7px 0 #47a953;animation:happy-hop .4s ease-out;opacity:1}
.tile.done::after{content:'✓';position:absolute;right:-7px;top:-9px;display:grid;place-items:center;width:28px;height:28px;font-size:19px;background:#32a94a;border:3px solid #fff;border-radius:50%;color:#fff}
.tile:disabled{opacity:1}
.tile.fixed{background:#e4e9f2;border-color:#c8d0df;box-shadow:0 5px 0 #aeb8cb}
#stage[data-game=memoria] .tile:not(.revealed){background:linear-gradient(145deg,#8b7cef,#6054ca);border-color:#a599f6;box-shadow:0 7px 0 #443899;color:#fff;text-shadow:0 3px 0 #443899;font-size:72px}
#stage[data-game=memoria] .tile.revealed{animation:card-reveal .24s ease-out;background:#fff;border-color:#d4caf3;box-shadow:0 7px 0 #a596d6}
#stage[data-game=memoria] .tile.done{background:#d5f8c9;border-color:#68c371;box-shadow:0 7px 0 #47a953;animation:happy-hop .4s ease-out}
.slot.label{min-height:112px;background:#ffffff8c;border:4px dashed #9daec3;box-shadow:0 5px 0 #a8bacd40;border-radius:24px}
.slot.label .art{width:70px;height:70px;opacity:.33;filter:grayscale(1)}
.slot.label.done{background:#d5f8c9;border:4px solid #68c371;box-shadow:0 7px 0 #47a953}
.slot.label.done .art{opacity:1;filter:none}
.bank{gap:16px;padding:16px;background:#ffffff8c;border-radius:24px;border:3px solid #ffffff;max-width:850px;margin:26px auto 8px}
.bank .tile{min-width:115px;min-height:112px;border-color:#ffce5b;background:#fff0b0;box-shadow:0 7px 0 #dcae39}
.bank .tile:disabled{visibility:hidden;pointer-events:none}
.bank .tile.dragging{scale:1.1;box-shadow:0 12px 24px #162d5240;transition:none}
.bank .tile .art{width:80px;height:80px}
.model{max-width:850px;margin:12px auto;padding:16px;font-size:clamp(30px,4vw,46px);background:#ffffffda;border:3px solid #d0c6ed;border-radius:24px;box-shadow:0 5px 0 #b9a7da30;letter-spacing:3px}
.model .art{width:1.2em;height:1.2em;margin:0 4px}
.counting{gap:16px;padding:18px;margin:15px auto;background:#ffffffb3;border:3px dashed #9ec66b;border-radius:24px;font-size:48px}
.counting>span:nth-child(2n) .art img{rotate:-8deg}
.counting>span:nth-child(2n+1) .art img{rotate:8deg}
.primary{border:3px solid #96b2ff;box-shadow:0 6px 0 #2545a8;border-radius:22px;min-width:75px;min-height:65px;font-size:30px;background:#466aef;margin:12px 8px}
.primary:active{translate:0 5px;box-shadow:0 1px 0 #2545a8}
.keys{gap:8px}.keys button{min-width:46px;min-height:48px;font-size:23px;border-radius:12px;border-width:3px;box-shadow:0 4px 0 #d3c397}
.sudoku{max-width:465px;gap:9px}.sudoku .tile{min-width:0;min-height:92px;border-radius:16px;font-size:45px}
.maze{border:4px solid #556c2a;border-radius:16px;overflow:hidden;background:#556c2a;box-shadow:0 8px 0 #76924645;max-width:485px}
.maze .maze-cell{font-size:42px}.maze .maze-cell.current{background-color:#fff294!important;box-shadow:inset 0 0 0 4px #ffc342}
.maze .current .art{animation:mouse-wiggle .4s ease-out}
#stage[data-game=saltos] .tile.selected .art{animation:happy-hop .4s ease-out}
#stage[data-game=melodia] .row .tile{width:125px;height:125px;border-radius:50%;border-color:#ffffff;box-shadow:0 9px 0 #8e80ae55;font-size:80px;background:#faf8ff}
#stage[data-game=melodia] .row .tile:nth-child(1){background:#ffe2e4;box-shadow:0 9px 0 #dd6d78}
#stage[data-game=melodia] .row .tile:nth-child(2){background:#fff2b9;box-shadow:0 9px 0 #d2b54b}
#stage[data-game=melodia] .row .tile:nth-child(3){background:#d8edff;box-shadow:0 9px 0 #5b9bc9}
#stage[data-game=melodia] .row .tile:nth-child(4){background:#d8f7dd;box-shadow:0 9px 0 #64b475}
#stage[data-game=melodia] .tile.flash{animation:music-pulse .4s ease-out;filter:brightness(1.12);outline:6px solid #fbd34d;outline-offset:5px}
.garden{padding:13px;border:4px solid #609739;background:#85b94c;box-shadow:0 7px 0 #49782a}
.lane{border:3px solid #cce8a3;border-radius:18px;min-height:105px;gap:4px}
.lane button{min-height:76px;border:3px solid #d4a12e;box-shadow:0 5px 0 #b18b28;font-size:35px}
.lane button .art{width:1.1em;height:1.1em}
.lane [data-enemy]{position:relative;display:grid;place-items:center}.lane [data-enemy] .art img{animation:bug-walk .65s ease-in-out infinite alternate}
.lane button .art img[src*=1F33B]{animation:flower-wave 2s ease-in-out infinite;transform-origin:50% 100%}
#feedback{font-size:26px;min-height:36px;margin:12px 0}
#reward{position:fixed;inset:0;z-index:70;display:grid;place-items:center;margin:0;border:0;border-radius:0;background:#152c50c9;box-shadow:none;padding:20px;backdrop-filter:blur(5px)}
.reward-card{width:min(500px,100%);text-align:center;background:linear-gradient(#ffefb2,#ffd760);border:7px solid #fff;border-radius:40px;padding:28px 24px;box-shadow:0 12px 0 #152c5045;animation:reward-arrive .4s cubic-bezier(.2,.8,.3,1.3)}
.reward-star{display:block;font-size:125px;line-height:1.1;filter:drop-shadow(0 7px 0 #b4782440);animation:trophy-dance 1.7s ease-in-out infinite}
.reward-star .art{width:1.25em;height:1.25em}
.reward-card h2{font-size:42px;font-weight:950;color:#805600;margin:18px 0}
#reward button{background:#fff;color:#284b94;border:3px solid #c0d3fa;box-shadow:0 6px 0 #7186ad;border-radius:24px;font-size:44px;width:100px;min-height:82px;margin:10px}
#reward #next{background:#4774ed;color:#fff;border-color:#86a5fc;box-shadow:0 6px 0 #2546a3}
.fx-layer{position:fixed;inset:0;z-index:80;overflow:hidden;pointer-events:none;contain:strict}
.fx-particle{position:absolute;font-size:24px;line-height:1;font-weight:900;pointer-events:none;text-shadow:0 2px 0 #1a254022}
@keyframes rocket-flight{0%,100%{transform:translateY(0) rotate(15deg)}50%{transform:translate(8px,-14px) rotate(21deg)}}
@keyframes planet-float{0%,100%{transform:translateY(0) rotate(-6deg)}50%{transform:translateY(-10px) rotate(6deg)}}
@keyframes flower-wave{0%,100%{rotate:-5deg}50%{rotate:6deg}}
@keyframes character-bob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-7px) rotate(3deg)}}
@keyframes character-wiggle{from{transform:rotate(-9deg) scale(1.08)}to{transform:rotate(9deg) scale(1.08)}}
@keyframes star-sparkle{0%,100%{scale:1}45%{scale:1.15;rotate:-8deg}70%{rotate:7deg}}
@keyframes board-arrive{from{opacity:.5;translate:0 7px}to{opacity:1;translate:0 0}}
@keyframes happy-hop{0%,100%{scale:1}40%{scale:1.07;translate:0 -8px}70%{scale:.97}}
@keyframes card-reveal{from{rotate:y 70deg;scale:.92}to{rotate:y 0deg;scale:1}}
@keyframes music-pulse{0%,100%{scale:1}40%{scale:1.12}}
@keyframes mouse-wiggle{0%,100%{rotate:0deg}40%{rotate:-12deg}70%{rotate:10deg}}
@keyframes bug-walk{from{translate:0 -2px;rotate:-4deg}to{translate:0 2px;rotate:4deg}}
@keyframes reward-arrive{from{scale:.7;opacity:0}to{scale:1;opacity:1}}
@keyframes trophy-dance{0%,100%{translate:0 0;rotate:-6deg}50%{translate:0 -12px;rotate:6deg}}
@media(max-width:650px){main{padding:14px 10px 35px}.intro{min-height:275px;padding:20px 20px 120px}#cards{gap:18px;grid-template-columns:repeat(2,minmax(0,1fr))}.card{min-height:210px;padding:14px 8px;gap:9px}.card .emoji{width:100px;height:100px;font-size:75px}.card b{font-size:23px}.card small:last-child{font-size:16px;padding:5px 10px}.world-pill{min-width:56px}.gamebar h2{font-size:26px}#level{font-size:17px}#stars{gap:4px;font-size:23px;padding:11px 0 7px}.instruction{display:grid;grid-template-columns:1fr 48px;gap:7px;padding:8px;margin-bottom:12px}.instruction p{font-size:17px;grid-column:1;grid-row:1;white-space:normal}.visual-help{grid-column:1;grid-row:2;font-size:22px;text-align:left;line-height:1.2}.instruction #read{grid-column:2;grid-row:1/3}.instruction #retry{grid-column:2;grid-row:1/3}#stage{min-height:340px;padding:16px 10px;border-radius:25px}.board{gap:10px;max-width:100%;margin:14px auto}.tile{min-width:0;min-height:72px;border-radius:18px;font-size:36px;border-width:3px;box-shadow:0 5px 0 #d3c397}.target{font-size:42px;margin-bottom:14px;min-width:140px;border-width:4px}.tile.done{box-shadow:0 5px 0 #47a953}.tile.done::after{width:23px;height:23px;font-size:16px;right:-5px;top:-6px}.slot.label{min-height:85px;border-width:3px;font-size:28px}.slot.label .art{width:54px;height:54px}.bank{gap:12px;padding:12px;margin-top:20px}.bank .tile{min-width:88px;min-height:90px}.bank .tile .art{width:60px;height:60px}.model{font-size:27px;padding:12px 8px;letter-spacing:1px}.model .art{margin:0 1px}.counting{font-size:36px;gap:12px;padding:12px}.sudoku{gap:7px}.sudoku .tile{min-height:72px;font-size:36px;border-radius:12px}.maze .maze-cell{font-size:30px}#stage[data-game=melodia] .row{gap:10px}#stage[data-game=melodia] .row .tile{width:65px;height:70px;min-width:0;min-height:0;font-size:40px;border-width:3px}#stage[data-game=memoria] .tile:not(.revealed){font-size:48px}.garden{padding:6px;border-width:3px}.lane{grid-template-columns:49px repeat(8,minmax(0,1fr));gap:1px;border-width:2px;padding:6px 2px;min-height:83px}.lane button{min-height:63px;font-size:25px}.lane small{font-size:12px}.lane>span{font-size:20px}.lane>span .art{width:1.15em;height:1.15em}.primary{font-size:27px;min-height:60px;min-width:68px}.keys{gap:6px}.keys button{min-height:43px;min-width:36px;font-size:21px;border-radius:10px}.reward-card{padding:22px 16px;border-width:5px;border-radius:32px}.reward-star{font-size:110px}.reward-card h2{font-size:35px}#reward button{width:90px;min-width:0;min-height:76px;margin:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.hero-rocket{transform:rotate(15deg)}}
#stars>span.earned.newest{animation:star-sparkle .55s ease-out}
@media(prefers-reduced-motion:no-preference){#stage[data-game=busca] .tile:not(.done) .art img{animation:animal-breathe 3.5s ease-in-out infinite}#stage[data-game=busca] .tile:nth-child(3n) .art img{animation-delay:-1.1s}#stage[data-game=busca] .tile:nth-child(3n+1) .art img{animation-delay:-2.2s}}
@keyframes animal-breathe{0%,100%{translate:0 0;rotate:-2deg}50%{translate:0 -3px;rotate:2deg}}
.teacher-toolbar{background:#fff;border:3px solid #9bb2df;border-radius:22px;padding:14px 18px;margin-bottom:20px;box-shadow:0 5px 0 #c7d6ec;color:#20395d;scroll-margin-top:12px}.teacher-heading{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.teacher-heading b{font-size:22px}.teacher-heading span{flex:1;font-size:15px}.teacher-toolbar button{padding:10px 14px;min-height:45px;border:2px solid #a6bce4;background:#edf3ff;border-radius:12px;font-size:16px;font-weight:700}.teacher-toolbar button:disabled{opacity:.4}.teacher-controls{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.teacher-controls label{display:flex;flex-direction:column;gap:5px;font-size:14px;font-weight:700}.teacher-controls select{font:inherit;background:#fff;border:2px solid #a6bce4;border-radius:10px;padding:10px;min-height:45px;max-width:100%}.teacher-controls output{align-self:center;font-size:15px;font-weight:700}.teacher-login{background:#edf3ff;padding:16px;border:2px solid #c5d3ed;border-radius:16px;margin:16px 0}.teacher-login label{font-size:17px;font-weight:700}.teacher-login>div{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px}.teacher-login input{font-size:20px;max-width:240px;min-height:48px}.teacher-login button{margin:0;font-size:17px}.teacher-login p{font-size:16px;color:#a52222;margin:8px 0 0}.teacher-login input[type=password]{text-transform:none}@media(max-width:650px){.teacher-toolbar{padding:12px}.teacher-heading{gap:8px}.teacher-heading span{flex-basis:100%}.teacher-heading button{margin-left:auto}.teacher-controls{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:10px}.teacher-controls label:first-of-type{grid-column:1/3;grid-row:1}.teacher-controls label:last-of-type{grid-column:1/3;grid-row:2}.teacher-controls select{width:100%}.teacher-controls output{grid-column:1/3;text-align:center}.teacher-login input{width:100%;max-width:100%}.teacher-login button{width:100%}}

/* Pantalla de juego: nombre, nivel, casa y tablero. */
body:not([data-world=menu]) header h1{font-size:clamp(22px,4vw,34px)}
header #level{margin-left:auto;font-size:20px;white-space:nowrap}
#game #stage{margin-top:20px;border:3px solid #d5dfec;border-radius:28px}
.garden-goal{text-align:center;font-size:22px;font-weight:800;margin:4px 0 10px}
.garden-status{text-align:center;font-size:18px;margin:8px 0}

/* Consigna visual grande y respuesta clara para primer grado */
.hint{display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap;margin:0 auto 1rem;padding:.8rem 1.4rem;border-radius:1.2rem;background:#fff7d6;border:3px solid #f5c638;font-size:clamp(1.6rem,4vw,2.4rem);max-width:40rem}
.hint b{font-size:.8em}
#feedback{font-size:2rem;font-weight:800;min-height:2.6rem;color:#15803d}
#feedback[data-bad="true"]{color:#c2410c}
.intro h2{font-size:clamp(2rem,6vw,3rem)}
#cards .card{min-height:9rem}
#cards .card .emoji{font-size:3.2rem}

.hint{padding:.4rem 1.2rem;margin-bottom:.6rem}
#feedback{position:fixed;left:50%;bottom:1.2rem;transform:translateX(-50%);margin:0;padding:.4rem 1.4rem;border-radius:999px;background:#fff;box-shadow:0 4px 16px #0002;z-index:20;pointer-events:none}
#feedback:empty{display:none}
.garden-status{font-size:2rem;letter-spacing:.2rem}
.slot{min-height:70px!important}#stage{padding:16px}
.card{position:relative}.kbd-badge{position:absolute;top:10px;right:12px;font-size:2rem;background:#fff;border-radius:12px;padding:2px 8px}
.hint{max-width:56rem;flex-wrap:nowrap;font-size:clamp(1.3rem,3vw,2rem)}
/* Jardín: tablero fijo con movimientos lentos y visibles */
.garden2{display:grid;gap:10px;padding:12px;border-radius:20px;background:#6aa84f;max-width:960px;margin:auto}
.g-lane{display:flex;gap:10px;align-items:stretch;height:96px}
.g-plant{flex:0 0 120px;border:4px solid #d4a12e;border-radius:18px;background:#fff7db;font-size:34px;line-height:1}
.g-plant.empty{border-style:dashed;animation:g-pulse 1.4s ease-in-out infinite}
.g-plant:disabled{opacity:1}
.g-field{position:relative;flex:1;border-radius:16px;overflow:hidden;background:repeating-linear-gradient(90deg,#b9dc8a 0 12.5%,#c8e59d 12.5% 25%)}
.g-bug{position:absolute;top:50%;width:calc(12.5% - 8px);transform:translateY(-50%);display:grid;place-items:center;transition:left .9s ease-in-out}
.g-body{font-size:44px;line-height:1}
.g-hp{font-size:14px;line-height:1}
.g-bug.hit{animation:g-hit .4s}
.g-bug.gone{transition:opacity .5s;opacity:0}
.g-seed{position:absolute;top:50%;transform:translateY(-50%);font-size:26px;color:#f59e0b;transition:left .6s linear;z-index:2}
.garden2.lost{outline:6px solid #ef4444}
@keyframes g-hit{0%,100%{transform:translateY(-50%)}25%{transform:translate(8px,-50%) scale(1.2)}50%{filter:brightness(2)}75%{transform:translate(-6px,-50%)}}
@keyframes g-pulse{50%{transform:scale(1.06)}}
@media(max-width:650px){.g-plant{flex-basis:70px;font-size:22px}.g-body{font-size:28px}.g-lane{height:72px}}
.garden-status{min-height:2.6rem;margin:4px 0 8px}
.g-plant{font-size:48px}.g-plant .art,.g-body .art{width:1em;height:1em}
/* Palabras: hoja de procesador de texto como en la primera actividad. Letras para calcar y Enter para cambiar de línea. */
#stage[data-game=escribe]{padding:14px}
.doc{max-width:900px;margin:0 auto;border:4px solid #1f2a44;border-radius:18px;overflow:hidden;background:#e7e5e4;box-shadow:0 8px 0 #1f2a4422;text-align:left}
.doc-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:7px 14px;background:#2b579a;color:#fff;font-size:20px;font-weight:900}
.doc-name{white-space:nowrap}
.doc-strip{display:flex;flex-wrap:wrap;gap:4px}
.doc-pic{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;font-size:26px;opacity:.45;filter:grayscale(1);transition:opacity .2s,background .2s}
.doc-pic.done{opacity:1;filter:none;background:#ffffff30}
.doc-pic.current{opacity:1;filter:none;background:#fff;box-shadow:0 3px 0 #173a6e;scale:1.1}
.doc-tools{display:flex;gap:6px;padding:5px 12px;background:#f3f2f1;border-bottom:2px solid #d6d4d2}
.doc-tool{display:grid;place-items:center;width:34px;height:30px;border-radius:6px;font:800 19px Georgia,serif;color:#323130}
.doc-tool:nth-child(2){font-style:italic}.doc-tool:nth-child(3){text-decoration:underline}.doc-tool:nth-child(4){text-decoration:underline 4px #dc2626}
.doc-desk{padding:14px}
.doc-paper{display:flex;flex-direction:column;height:310px;padding:12px 28px 64px;background:#fff;box-shadow:0 3px 10px #0003}
.doc-lines{display:flex;flex-direction:column;justify-content:flex-end;min-height:0;overflow:hidden;mask-image:linear-gradient(transparent,#000 40px)}
.doc-old{display:flex;align-items:center;gap:12px;flex:none;min-height:46px;font-size:30px;font-weight:800;letter-spacing:.08em;color:#1f2a44;animation:doc-up .3s ease-out}
.doc-old.english{color:#1d4ed8}
.doc-line{display:flex;flex-wrap:wrap;align-items:center;gap:.25em;flex:none;margin-top:6px;font-size:clamp(34px,7vw,70px);font-weight:800;line-height:1.2;animation:doc-in .3s ease-out}
.line-pic{position:relative;display:inline-grid;place-items:center;margin-right:.1em}
.en-tag{position:absolute;left:50%;bottom:-.5em;translate:-50% 0;padding:2px 8px;border-radius:99px;background:#1d4ed8;color:#fff;font-size:12px;font-weight:900;letter-spacing:1px;white-space:nowrap;box-shadow:0 2px 0 #1e3a8a}
.doc-old .en-tag{position:static;translate:none;font-size:11px;letter-spacing:1px}
.letters{display:inline-flex;align-items:center}
.ch{display:inline-block;width:.8em;margin:0 .03em;text-align:center;border-bottom:6px solid #e2e8f0}
.ch.pend{color:#cbd5e1}
.ch.next{border-bottom-color:#2b579a;animation:doc-next 1s ease-in-out infinite}
.ch.ok{color:#1f2a44;border-bottom-color:#1f2a44;animation:doc-pop .2s ease-out}
.doc-line.english .ch.ok{color:#1d4ed8;border-bottom-color:#1d4ed8}
.ch.bad{color:#dc2626;border-bottom-color:#dc2626;background:#fee2e2;border-radius:10px 10px 0 0}
.doc-line.complete .ch.ok{color:#15803d;border-bottom-color:#22c55e}
.doc-line.complete .line-pic{animation:happy-hop .45s ease-out}
.caret{display:inline-block;width:5px;height:1em;margin:0 -2.5px;border-radius:3px;background:#2b579a;animation:doc-blink 1s steps(1) infinite}
.doc-key{display:inline-grid;place-items:center;min-width:2.4em;height:1.5em;margin-left:.3em;padding:0 .3em;font-size:.6em;font-weight:900;border:3px solid #94a3b8;border-bottom-width:8px;border-radius:14px;background:#f8fafc;color:#1f2a44;animation:doc-key 1s ease-in-out infinite}
.doc-key[data-key=Backspace]{border-color:#f87171;background:#fef2f2;color:#b91c1c}
.doc-key[data-key=Enter]{border-color:#4ade80;background:#f0fdf4;color:#166534}
@keyframes doc-blink{50%{opacity:0}}
@keyframes doc-in{from{opacity:0;translate:0 18px}}
@keyframes doc-up{from{opacity:0;translate:0 28px}}
@keyframes doc-pop{50%{scale:1.2}}
@keyframes doc-next{50%{border-bottom-color:#93c5fd}}
@keyframes doc-key{50%{translate:0 3px;border-bottom-width:5px}}
@media(max-width:650px){#feedback{font-size:1.3rem;white-space:nowrap}#stage[data-game=escribe]{padding:10px 6px}.doc{border-width:3px}.doc-bar{font-size:16px;padding:6px 8px}.doc-pic{width:28px;height:28px;font-size:19px;border-radius:7px}.doc-tools{padding:4px 8px}.doc-tool{width:28px;height:26px;font-size:16px}.doc-desk{padding:8px}.doc-paper{height:270px;padding:8px 10px 56px}.doc-old{font-size:22px;min-height:36px;gap:8px}.doc-line{font-size:34px}.ch{border-bottom-width:4px}.en-tag{font-size:10px;padding:1px 6px}}
@media(max-height:700px) and (min-width:651px){.doc-paper{height:280px}.doc-line{font-size:60px}}
/* Laberinto: ratón y gato caminan sobre el tablero. El gato duerme hasta el primer paso y después persigue. */
.maze{position:relative}
.maze .maze-cell.visited{box-shadow:inset 0 0 0 999px #fff3a070}
.maze-status{text-align:center;font-size:2rem;min-height:2.6rem;margin:0 0 8px}
.maze-sprite{position:absolute;z-index:2;display:grid;place-items:center;width:calc(100% / var(--n));height:calc(100% / var(--n));font-size:min(calc(300px / var(--n)),calc(60vw / var(--n)));transition:left .2s ease-out,top .2s ease-out;pointer-events:none}
.maze-sprite .art{width:1em;height:1em}
.maze-sprite.left .art img{scale:-1 1}
.maze-mouse{z-index:3}
.maze-mouse .art img{animation:maze-trot .28s ease-in-out infinite alternate}
.maze-cat{transition-duration:.45s;opacity:.8}
.maze-cat.awake{opacity:1}
.maze-cat.awake .art img{animation:maze-trot .22s ease-in-out infinite alternate}
.maze-zzz{position:absolute;top:0;right:4%;font-size:.45em;animation:maze-zzz 1.6s ease-in-out infinite}
.maze-cat.awake .maze-zzz{display:none}
.maze-cheese{display:grid;place-items:center;animation:maze-cheese 1.2s ease-in-out infinite}
.maze-cell.eaten .maze-cheese{animation:maze-eat .45s ease-in forwards}
.maze.lost{outline:6px solid #ef4444}
.maze-cat.pounce .art img{animation:maze-pounce .5s ease-out}
.maze-mouse.caught{opacity:.4;filter:grayscale(1)}
@keyframes maze-trot{from{translate:0 -2px;rotate:-5deg}to{translate:0 2px;rotate:5deg}}
@keyframes maze-zzz{0%,100%{translate:0 0;opacity:.5}50%{translate:4px -6px;opacity:1}}
@keyframes maze-cheese{0%,100%{scale:1}50%{scale:1.12}}
@keyframes maze-eat{to{scale:0;rotate:30deg;opacity:0}}
@keyframes maze-pounce{0%{scale:1}40%{scale:1.4}100%{scale:1.15}}
/* Jardín: Plantas vs Bichos en un marco 960×600 que entra en la pantalla sin scroll. */
#stage[data-game=jardin]{padding:12px}
.pvb{display:block;width:min(100%,960px,calc((100vh - 210px) * 1.6));aspect-ratio:960/600;margin:0 auto;border:0;border-radius:16px;background:#2c4a1a;box-shadow:0 8px 0 #1d331140}
/* Planetas: tarjetas con dibujo y nombre, modelo con el Sol, viaje en cohete y preguntas de cuál falta o sigue. */
#stage[data-game=planetas]{padding:14px}
.pl{display:inline-flex;flex-direction:column;align-items:center;gap:2px;min-width:0;font-size:15px;font-weight:850;line-height:1.1;color:#1f2a44}
.pl-pic{font-size:56px;line-height:1}
.pl-pic .art{width:1em;height:1em}
.pl-name{white-space:nowrap}
.pl-model{position:relative;display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:6px 12px;max-width:980px;margin:0 auto 12px;padding:10px 14px;border-radius:22px;background:#1f2a5a;box-shadow:0 5px 0 #141c40}
.pl-model .pl{color:#fff}.pl-model .pl-pic{font-size:46px}
.pl-model.covered>.pl{visibility:hidden}
.pl-peek{position:absolute;inset:0;margin:auto;width:84px;height:64px;border:3px solid #fff;border-radius:18px;background:#4662cf;font-size:34px;box-shadow:0 5px 0 #263c98;display:none}
.pl-model.covered .pl-peek{display:block}
#stage[data-game=planetas] .board{max-width:1000px;gap:8px;align-items:stretch}
#stage[data-game=planetas] .board .pl-sun{align-self:center}
#stage[data-game=planetas] .board .pl-sun .pl-pic{font-size:70px}
#stage[data-game=planetas] .tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:112px;padding:6px 2px;font-size:15px;font-weight:850;line-height:1.1}
#stage[data-game=planetas] .tile .art{width:56px;height:56px}
#stage[data-game=planetas] .slot.label{min-height:112px!important;font-size:15px}
#stage[data-game=planetas] .slot.label:not(.done){color:#9aa7b8}
#stage[data-game=planetas] .slot.label .art{width:56px;height:56px}
#stage[data-game=planetas] .bank .tile{min-width:104px;min-height:112px}
#stage[data-game=planetas] .bank .tile .art{width:60px;height:60px}
.pl-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px 14px;padding:16px;border-radius:24px;background:#1f2a5a;box-shadow:0 6px 0 #141c40;max-width:1000px;margin:6px auto 18px}
.pl-row .pl{color:#fff}.pl-row .pl-pic{font-size:60px}
.pl-gap{display:grid;place-items:center;width:84px;height:92px;border:4px dashed #9db4ff;border-radius:20px;color:#9db4ff;font-size:44px;font-weight:900}
.pl-gap.now{border-color:#ffd24b;color:#ffd24b;animation:pl-pulse 1s ease-in-out infinite}
.pl.filled{animation:happy-hop .45s ease-out}
.pl-arrow,.pl-dots-mid{color:#fff;font-size:40px;font-weight:900}
.pl-dots{text-align:center;font-size:28px;letter-spacing:6px;color:#4662cf;margin:0 0 6px}
.pl-options{gap:16px}
.pl-option{min-width:120px!important;min-height:120px!important}
.space{position:relative;height:min(400px,calc(100vh - 330px));min-height:280px;max-width:1000px;margin:0 auto;border-radius:26px;overflow:hidden;background:radial-gradient(circle at 75% 30%,#3b3f8f 0,transparent 45%),radial-gradient(circle,#fff 0 1px,transparent 1.5px) 0 0/37px 41px,radial-gradient(circle,#fff9 0 1px,transparent 1.5px) 13px 19px/53px 47px,#141a3d;box-shadow:0 7px 0 #0c1130}
.space-sun{position:absolute;left:-46px;top:50%;translate:0 -50%}
.space-sun .pl-pic{font-size:150px}.space-sun .pl-name{display:none}
.space .pl-option.space-planet{position:absolute;translate:-50% -50%;min-width:0!important;min-height:0!important;padding:4px 8px;background:#ffffff14;border:3px solid #ffffff40;box-shadow:none;border-radius:20px}
.space .space-planet .pl{color:#fff}.space .space-planet .pl-pic{font-size:54px}
.space .space-planet.done{background:#2f9e4466;border-color:#69db7c;box-shadow:none}
.space .space-planet.done::after{display:none}
.pl-order{position:absolute;top:-10px;right:-10px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#ffd24b;color:#1f2a44;font-size:18px;font-weight:900;border:3px solid #fff}
.trail{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.trail polyline{fill:none;stroke:#ffd24b;stroke-width:4;stroke-dasharray:10 8;stroke-linecap:round;vector-effect:non-scaling-stroke}
.rocket{position:absolute;z-index:3;translate:-50% -50%;font-size:44px;line-height:1;pointer-events:none;transition:left .8s ease-in-out,top .8s ease-in-out,rotate .25s}
.rocket .art{width:1em;height:1em}
@keyframes pl-pulse{50%{scale:1.08}}
@media(max-width:650px){#stage[data-game=planetas] .board{grid-template-columns:repeat(5,minmax(0,1fr))!important}.pl-pic{font-size:40px}.pl-model .pl-pic{font-size:32px}.pl{font-size:12px}.pl-row .pl-pic{font-size:40px}.pl-gap{width:60px;height:70px;font-size:30px}.space-sun .pl-pic{font-size:100px}.space .space-planet .pl-pic{font-size:36px}.pl-option{min-width:90px!important;min-height:96px!important}}
/* Flechas: carriles tipo Piano Tiles; cada flecha cae hasta su tecla de abajo. */
#stage[data-game=direcciones]{padding:14px}
.tiles-hud{display:flex;align-items:center;gap:8px;max-width:560px;margin:0 auto 10px}
.tiles-heart{font-size:30px;line-height:1;transition:opacity .2s,filter .2s}.tiles-heart .art{width:1em;height:1em}
.tiles-heart.gone{opacity:.25;filter:grayscale(1)}
.tiles-bar{flex:1;height:16px;margin-left:8px;border-radius:99px;background:#e2e8f0;overflow:hidden;box-shadow:inset 0 2px 0 #0001}
.tiles-bar span{display:block;height:100%;width:0;background:linear-gradient(90deg,#4ade80,#16a34a);transition:width .3s}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;max-width:560px;height:min(470px,calc(100vh - 320px));min-height:280px;margin:0 auto;padding:8px;border-radius:24px;background:#1b1f3b;box-shadow:0 8px 0 #10132a}
.tiles.lost{outline:6px solid #ef4444}
.tiles-lane{position:relative;overflow:hidden;border-radius:16px;background:linear-gradient(#ffffff06,#ffffff16)}
.tiles-lane:nth-child(1){--c:#a855f7}.tiles-lane:nth-child(2){--c:#3b82f6}.tiles-lane:nth-child(3){--c:#22c55e}.tiles-lane:nth-child(4){--c:#f97316}
.tiles-key,.tiles-fall{position:absolute;left:6px;right:6px;height:min(86px,22%);border-radius:16px}
.tiles-key{bottom:6px;border:4px solid var(--c);background:#ffffff10;transition:background .1s}
.tiles-key.press{background:var(--c)}
.tiles-key.bad{border-color:#ef4444;background:#ef444466}
.tiles-fall{top:0;background:var(--c);box-shadow:0 6px 0 #0005,inset 0 3px 0 #fff6}
.tiles-fall.hit{animation:tiles-hit .3s ease-out forwards}
.tiles-fall.miss{background:#ef4444;opacity:.6}
.tiles-arrow{display:grid;place-items:center;width:100%;height:100%}
.tiles-arrow svg{width:60%;height:60%;fill:#fff;filter:drop-shadow(0 3px 0 #0003)}
.tiles-key .tiles-arrow svg{fill:var(--c);filter:none}
.tiles-key.press .tiles-arrow svg{fill:#fff}
@keyframes tiles-hit{to{scale:1.35;opacity:0}}
/* Sapito saltarín: estanque con nenúfares; cada uno tiene una tecla y al final espera la sapita. */
#stage[data-game=sapo]{padding:14px}
.pond{position:relative;max-width:1000px;height:min(440px,calc(100vh - 300px));min-height:300px;margin:0 auto;border-radius:28px;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 22% 38%,#bae6fd66 0 4%,transparent 5%),radial-gradient(ellipse at 68% 80%,#bae6fd55 0 5%,transparent 6%),radial-gradient(ellipse at 88% 15%,#bae6fd55 0 3%,transparent 4%),linear-gradient(160deg,#38bdf8,#0369a1);box-shadow:inset 0 0 0 7px #65a30d,0 8px 0 #3f6212}
.pond::before{content:'';position:absolute;inset:-30%;z-index:-1;background:repeating-radial-gradient(circle,transparent 0 34px,#ffffff14 35px 37px);animation:pond-ripple 7s linear infinite}
.pad{position:absolute;translate:-50% -50%;width:min(108px,14%);aspect-ratio:1;display:grid;place-items:center;border-radius:50%;background:conic-gradient(from 120deg,transparent 0 26deg,#4ade80 26deg);filter:drop-shadow(0 6px 0 #075985aa)}
.pad::before{content:'';position:absolute;inset:7%;border-radius:50%;background:repeating-conic-gradient(from 133deg,#15803d44 0 2deg,transparent 2deg 36deg)}
.pad-start{background:conic-gradient(from 120deg,transparent 0 26deg,#86efac 26deg)}
.pad-key{position:relative;display:grid;place-items:center;width:54%;aspect-ratio:1;border-radius:14px;background:#fff;border:3px solid #cbd5e1;border-bottom-width:7px;color:#1f2a44;font:900 clamp(22px,3.2vw,38px)/1 system-ui,sans-serif}
.pad.next .pad-key{border-color:#facc15;background:#fef9c3;animation:pad-next 1s ease-in-out infinite}
.pad.visited .pad-key{visibility:hidden}
.pad.sinking{animation:pad-sink var(--sink) ease-in forwards}
.pad-girl{position:absolute;top:-2%;left:84%;width:min(74px,10vw);line-height:0}.pad-girl.left{left:auto;right:84%}
.frog{position:absolute;z-index:3;translate:-50% -62%;width:min(84px,11vw);line-height:0;pointer-events:none}
.frog img,.pad-girl img{width:100%;image-rendering:pixelated;filter:drop-shadow(0 5px 0 #07598566);transform-origin:50% 100%;animation:frog-idle 1.8s ease-in-out infinite}
.frog.splash{animation:frog-splash .7s ease-in forwards}
.pond.love .frog img,.pond.love .pad-girl img{animation:frog-love .42s ease-in-out infinite alternate}
.pond.love .pad-girl img{animation-delay:-.21s}
.pond-heart{position:absolute;z-index:4;translate:-50% -50%;font-size:46px;line-height:1;pointer-events:none;animation:pond-heart 1.6s ease-out forwards}
.pond-heart .art{width:1em;height:1em}
@keyframes pond-ripple{to{transform:scale(1.2) rotate(8deg)}}
@keyframes pad-next{50%{scale:1.12}}
@keyframes pad-sink{0%{scale:1;opacity:1}55%{filter:drop-shadow(0 6px 0 #075985aa) brightness(.85)}100%{scale:.5;opacity:.25;filter:brightness(.55)}}
@keyframes frog-splash{40%{scale:1.2}100%{scale:0;rotate:200deg;opacity:0}}
@keyframes pond-heart{0%{scale:0;opacity:0}20%{scale:1.3;opacity:1}100%{translate:-50% -320%;opacity:0}}
@keyframes frog-idle{50%{scale:1.04 .95}}
@keyframes frog-love{from{translate:0 0;scale:1.05 .92}to{translate:0 -18px;scale:.95 1.06}}
/* Puente: el sapo y el chancho se empujan; escribir bien y rápido empuja al chancho al río. */
#stage[data-game=puente]{padding:14px}
.bridge-scene{position:relative;max-width:1000px;height:min(430px,calc(100vh - 290px));min-height:300px;margin:0 auto;border-radius:28px;overflow:hidden;background:radial-gradient(ellipse at 20% 22%,#fff 0 4%,transparent 4.5%),radial-gradient(ellipse at 26% 20%,#fff 0 3.5%,transparent 4%),radial-gradient(ellipse at 78% 30%,#fff 0 4%,transparent 4.5%),linear-gradient(#7dd3fc,#e0f2fe 60%);box-shadow:0 8px 0 #0c4a6e40}
.river{position:absolute;left:0;right:0;bottom:0;height:30%;background:repeating-radial-gradient(ellipse at 50% 0,#ffffff22 0 6px,transparent 7px 26px),linear-gradient(#0ea5e9,#0369a1)}
.cliff{position:absolute;bottom:0;width:9%;height:39%;background:linear-gradient(#65a30d 0 14px,#3f6212 14px 18px,#92400e 18px);box-shadow:inset 0 -30px 0 #78350f}
.cliff.left{left:0;border-radius:0 14px 0 0}.cliff.right{right:0;border-radius:14px 0 0 0}
.bridge{position:absolute;left:8%;right:8%;top:61%;height:16px;border-radius:4px;background:repeating-linear-gradient(90deg,#b45309 0 24px,#78350f 24px 27px);box-shadow:0 5px 0 #713f12}
.bridge::before{content:'';position:absolute;left:0;right:0;top:-44px;height:3px;background:#78350f;border-radius:2px}
.bridge::after{content:'';position:absolute;left:0;right:0;top:-44px;height:44px;background:repeating-linear-gradient(90deg,#78350f 0 3px,transparent 3px 54px)}
.pusher{position:absolute;z-index:2;top:61%;width:min(98px,12vw);line-height:0;transition:none}
.pusher img{width:100%;image-rendering:pixelated;filter:drop-shadow(0 4px 0 #0003)}
.pusher.hero{translate:-94% -100%;rotate:8deg;transform-origin:100% 100%}
.pusher.pig{translate:-6% -100%;rotate:-8deg;transform-origin:0 100%}
.pusher.pig img{animation:pig-push .5s ease-in-out infinite alternate}
.pusher.walk-in.hero{animation:walk-hero 2.4s ease-out both}
.pusher.walk-in.pig{animation:walk-pig 2.4s ease-out both}
.pusher.fall{animation:push-fall 1.1s ease-in forwards}
.push-word{position:absolute;z-index:3;top:14px;left:50%;translate:-50% 0;display:flex;align-items:center;gap:14px;padding:8px 18px;border-radius:22px;background:#fff;border:4px solid #fde68a;box-shadow:0 6px 0 #0c4a6e30;white-space:nowrap}
.pw-pic{font-size:46px;line-height:1}.pw-pic .art{width:1em;height:1em}
.pw-letters{display:inline-flex}
.pw-ch{display:inline-block;width:.8em;text-align:center;font:900 clamp(30px,4.6vw,52px)/1.15 system-ui,sans-serif;color:#cbd5e1;border-bottom:5px solid #e2e8f0}
.pw-ch.ok{color:#15803d;border-bottom-color:#22c55e}
.pw-ch.next{color:#1f2a44;border-bottom-color:#2b579a}
.push-combo{min-width:3.6em;font-size:24px;font-weight:900;color:#ea580c}
.push-combo .art{width:1em;height:1em}
.push-count{position:absolute;inset:0;z-index:4;display:grid;place-items:center;font:900 clamp(56px,10vw,96px)/1 system-ui,sans-serif;color:#fff;text-shadow:0 6px 0 #0c4a6e80;pointer-events:none}
@keyframes pig-push{to{translate:-3px 0;scale:1.03 .97}}
@keyframes walk-hero{from{left:4%}}
@keyframes walk-pig{from{left:96%}}
@keyframes push-fall{30%{top:55%}100%{top:115%;rotate:220deg;opacity:.3}}
/* Tateti: elegir rival, tablero que crece y fichas de chancho y sapo. */
#stage[data-game=tateti]{padding:14px}
.ttt-choose{display:flex;flex-wrap:wrap;justify-content:center;gap:24px;margin:24px auto}
.ttt-mode{display:flex;flex-direction:column;align-items:center;gap:14px;min-width:250px;padding:26px 30px;border:4px solid #ddd6fe;border-radius:30px;background:#fff;box-shadow:0 8px 0 #c4b5fd;font-size:26px;color:#4c1d95;transition:transform .15s}
.ttt-mode:hover{transform:translateY(-5px) rotate(-1deg)}
.ttt-mode:active{translate:0 6px;box-shadow:0 2px 0 #c4b5fd}
.ttt-faces{display:flex;gap:10px}
.ttt-face{display:inline-block;width:90px;line-height:0}
.ttt-face img,.ttt-piece img{width:100%;image-rendering:pixelated}
.ttt-mode .ttt-face img{animation:frog-idle 1.8s ease-in-out infinite;transform-origin:50% 100%}
.ttt-turn{display:flex;align-items:center;justify-content:center;gap:12px;min-height:66px;margin-bottom:8px;font-size:26px;font-weight:900;color:#1f2a44}
.ttt-turn .ttt-face{width:58px}
.ttt-turn .now img{animation:frog-love .42s ease-in-out infinite alternate}
.ttt-board{display:grid;grid-template-columns:repeat(var(--n),1fr);gap:8px;width:min(100%,460px,calc(100vh - 330px));min-width:240px;margin:0 auto;padding:10px;border-radius:26px;background:#7c3aed;box-shadow:0 8px 0 #5b21b6}
.ttt-cell{aspect-ratio:1;min-width:0;padding:9%;border:0;border-radius:16px;background:#f5f3ff;box-shadow:inset 0 -6px 0 #ddd6fe;line-height:0}
.ttt-cell:not(:disabled):hover{background:#fff}
.ttt-cell:disabled{opacity:1;cursor:default}
.ttt-piece{display:block;width:100%}
.ttt-piece img{animation:ttt-pop .32s cubic-bezier(.2,.8,.3,1.4)}
.ttt-cell.win{background:#fef08a;box-shadow:inset 0 -6px 0 #facc15,0 0 0 4px #facc15}
.ttt-cell.win img{animation:frog-love .42s ease-in-out infinite alternate}
@keyframes ttt-pop{from{scale:0;rotate:-25deg}}
.ttt-hint{display:inline-flex;gap:4px}.ttt-hint .ttt-face{width:34px}
/* Jirafa golosa: copa del árbol casi entera, una jirafa de costado que sube con la tecla y come en orden. */
#stage[data-game=jirafa]{padding:14px}
.jf-scene{position:relative;max-width:1000px;height:max(300px,min(440px,calc(100vh - 345px)));margin:0 auto;border-radius:28px;overflow:hidden;background:radial-gradient(circle at 8% 20%,#5cb85c 0 9%,transparent 9.5%),radial-gradient(circle at 30% 8%,#66c266 0 11%,transparent 11.5%),radial-gradient(circle at 55% 26%,#4caf50 0 12%,transparent 12.5%),radial-gradient(circle at 80% 10%,#66c266 0 10%,transparent 10.5%),radial-gradient(circle at 94% 40%,#5cb85c 0 10%,transparent 10.5%),radial-gradient(circle at 18% 52%,#4caf50 0 12%,transparent 12.5%),radial-gradient(circle at 46% 60%,#5cb85c 0 11%,transparent 11.5%),radial-gradient(circle at 74% 56%,#4caf50 0 12%,transparent 12.5%),radial-gradient(circle,#ffffff14 0 2px,transparent 3px) 0 0/26px 22px,linear-gradient(#3e9a43,#2f7d34 80%);box-shadow:0 8px 0 #1b5e2040}
.jf-trunk{position:absolute;left:44%;width:12%;bottom:0;height:16%;border-radius:12px 12px 0 0;background:linear-gradient(90deg,#7a461c,#a8692f 45%,#8d5524);box-shadow:inset 0 10px 0 #0003}
.jf-grass{position:absolute;left:0;right:0;bottom:0;height:7%;background:linear-gradient(#8bd36a,#6cbf4a)}
.jf-apple{position:absolute;z-index:4;translate:-50% -50%;display:grid;place-items:center;width:min(54px,6.5vw);aspect-ratio:1;border-radius:50% 50% 45% 45%;background:radial-gradient(circle at 34% 28%,#ffab91 0 10%,#e53935 42%,#b71c1c);color:#fff;font:900 clamp(20px,2.6vw,28px)/1 system-ui,sans-serif;text-shadow:0 2px 0 #7f1d1d;box-shadow:0 4px 0 #0003;transition:scale .2s}
.jf-apple::before{content:'';position:absolute;top:-9px;left:50%;width:15px;height:10px;border-radius:0 80% 0 80%;background:#1b5e20}
.jf-apple.next{scale:1.18;box-shadow:0 0 0 5px #fde047,0 4px 0 #0003;animation:jf-glow 1s ease-in-out infinite}
.jf{--w:min(170px,18vw);position:absolute;z-index:3;width:var(--w);aspect-ratio:1;left:calc(var(--x) - var(--w) * .72);top:calc(100% - var(--w) * .45);transition:left .6s ease-in-out,top .38s cubic-bezier(.3,1.35,.5,1)}
.jf.up{top:calc(var(--y) - var(--w) * .36)}
.jf-head{position:relative;z-index:1;display:block;width:100%;height:100%;overflow:visible;transform-origin:30% 80%;animation:jf-sway 3.2s ease-in-out infinite}
.jf-neck{position:absolute;left:17%;top:70%;width:24%;height:2000px;rotate:-6deg;transform-origin:50% 0;border:3px solid #7a4a12;border-width:0 3px;background:radial-gradient(circle at 30% 30%,#c47a2c 0 15%,transparent 16%) 0 0/100% 40px,radial-gradient(circle at 74% 72%,#c47a2c 0 13%,transparent 14%) 0 0/100% 40px,#f6c544;box-shadow:inset 5px 0 0 #b9771f}
.jf-jaw{transform-origin:56px 78px;transition:transform .14s ease-out}
.jf.up .jf-jaw{transform:rotate(26deg)}
.jf.chomp .jf-head{animation:jf-lunge .26s ease-out}
.jf.chomp .jf-jaw{transform:rotate(0deg);transition-duration:.08s}
.jf.chew .jf-jaw{animation:jf-chew .24s ease-in-out 3}
.jf-eye{transform-origin:55px 58px;animation:jf-blink 4.2s infinite}
.jf-scene.full .jf-head{animation:frog-love .4s ease-in-out infinite alternate}
.jf-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;max-width:1000px;margin:0 auto 8px}
.jf-bar .apple-count{position:static}
.jf-hold{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:18px;background:#ffffffe6;box-shadow:0 4px 0 #0002;font-weight:900;color:#1f2a44}
.jf-hand{font-size:28px;line-height:1}.jf-hand .art{width:1em;height:1em}
.jf-say{font-size:17px}
.jf-cap{min-width:46px;padding:6px 12px;text-align:center;border:3px solid #cbd5e1;border-bottom-width:7px;border-radius:12px;background:#fff;font:900 24px/1 system-ui,sans-serif;transition:background .1s,translate .1s}
.jf-hold.held .jf-cap{background:#fde047;border-color:#ca8a04;border-bottom-width:3px;translate:0 4px}
@keyframes jf-sway{50%{rotate:-4deg}}
@keyframes jf-lunge{40%{translate:6px -12px}}
@keyframes jf-chew{50%{transform:rotate(12deg)}}
@keyframes jf-blink{0%,92%,100%{transform:scaleY(1)}95%{transform:scaleY(.1)}}
@keyframes jf-glow{50%{box-shadow:0 0 0 9px #fde04788,0 4px 0 #0003}}
.apple-count{padding:6px 14px;border-radius:16px;background:#fff;font-size:22px;font-weight:900;color:#1f2a44;box-shadow:0 4px 0 #0002}.apple-count .art{width:1em;height:1em}
/* Camino de aventuras */
#camino{display:grid;gap:22px}
.camino-top{position:relative;text-align:left;padding:26px 30px;border-radius:32px;border:4px solid #fff;background:linear-gradient(120deg,#253461,#2f7d5b);color:#fff;box-shadow:0 9px 0 #26325e25}
.camino-top h2{font-size:clamp(30px,5vw,46px);margin:6px 0}.camino-top .badge{color:#ffe49b}.camino-top strong{color:#ffea9d;font-size:24px}
.camino-top .meter{max-width:420px;margin:12px 0;background:#ffffff30}
.camino-seguir{font-size:30px;font-weight:900;padding:12px 30px;border-radius:24px;border:3px solid #ffe9a0;background:#ffd24b;color:#3b2a00;box-shadow:0 6px 0 #b8901f;cursor:pointer}
.camino-seguir:active{transform:translateY(4px);box-shadow:0 2px 0 #b8901f}
.tramo{background:#ffffffc8;border:3px solid #dce6f2;border-radius:28px;padding:16px 18px 22px}
.tramo h3{margin:0 0 14px;font-size:28px;color:#253461}
.ruta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 26px;position:relative}
.parada{position:relative;display:grid;justify-items:center;gap:4px;padding:12px 6px;border-radius:24px;border:4px solid #fff;background:var(--color);color:#fff;font:inherit;cursor:pointer;box-shadow:0 6px 0 #10234230;min-height:150px}
.parada .emoji{font-size:48px;width:76px;height:76px;display:grid;place-items:center;border-radius:50%;background:#ffffffde}
.parada b{font-size:19px}.parada small{font-size:16px;font-weight:800;background:#172c5040;padding:3px 10px;border-radius:20px}
.parada .kbd-badge{position:absolute;top:6px;right:8px;font-size:20px}
.parada[data-estado=hecha]{opacity:.85}.parada[data-estado=hecha] small{background:#ffd24b;color:#3b2a00}
.parada[data-estado=actual]{outline:6px solid #ffd24b;outline-offset:3px;animation:latido 1.2s ease-in-out infinite}
.parada[data-estado=cerrada]{filter:grayscale(1);opacity:.45;cursor:default}
@keyframes latido{50%{transform:scale(1.06)}}
@media(prefers-reduced-motion:reduce){.parada[data-estado=actual]{animation:none}}
@media(max-width:650px){.ruta{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ruta>*{grid-column:auto!important;grid-row:auto!important}.parada{min-height:130px}.parada .emoji{width:62px;height:62px;font-size:40px}.camino-top{padding:20px}.camino-seguir{font-size:26px}}
.parada .num{position:absolute;top:6px;left:8px;min-width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#fff;color:#253461;font-weight:900;font-size:16px}
.ch.sp{width:.55em;border-bottom-color:transparent}.ch.sp.next{border-bottom-color:#2b579a}
.doc-line.largo{font-size:clamp(28px,4.6vw,52px)}
.doc-key[data-key=Espacio]{min-width:4em;border-color:#60a5fa;background:#eff6ff;color:#1d4ed8;font-size:.45em}

/* Jirafa: cartel grande con la tecla a mantener (se ve mientras no está apretada) */
.jf-guide{position:absolute;left:50%;top:50%;translate:-50% -50%;z-index:5;display:flex;flex-direction:column;align-items:center;gap:12px;width:min(520px,88%);padding:20px 22px;border-radius:26px;background:#fffffff2;box-shadow:0 10px 0 #0003;text-align:center;color:#1f2a44;pointer-events:none}
.jf-guide[hidden]{display:none}
.jf-guide-title{font-size:clamp(24px,4vw,34px);font-weight:900}
.jf-bigcap{min-width:96px;padding:12px 26px;border:5px solid #ca8a04;border-bottom-width:14px;border-radius:20px;background:#fde047;font:900 clamp(48px,8vw,72px)/1 system-ui,sans-serif;animation:jf-press 1.1s ease-in-out infinite}
.jf-guide-sub{font-size:clamp(34px,5vw,46px);font-weight:900;color:#1f2a44}
@keyframes jf-press{0%,100%{translate:0 0;border-bottom-width:14px}50%{translate:0 8px;border-bottom-width:6px}}
.jf-hold{padding:8px 14px;outline:4px solid #fde047}
.jf-hand{font-size:34px}.jf-say{font-size:21px}.jf-cap{min-width:60px;font-size:32px}

/* Flechas: la tecla que hay que apretar se ilumina y un cartel enseña a jugar al empezar */
.tiles{position:relative}
.tiles-key.want{background:color-mix(in srgb,var(--c) 45%,transparent);box-shadow:0 0 0 4px #fff,0 0 22px var(--c);animation:tiles-want .7s ease-in-out infinite alternate}
@keyframes tiles-want{to{scale:1.05}}
.tiles-intro{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;border-radius:24px;background:#1b1f3bf2;text-align:center;color:#fff}
.tiles-intro-title{font-size:clamp(24px,4vw,34px);font-weight:900}
.tiles-intro-sub{max-width:420px;font-size:clamp(17px,2.4vw,22px);font-weight:800;color:#c7d2fe}
.tiles-intro-go{font-size:clamp(18px,2.6vw,24px);font-weight:900;color:#fde047;animation:tiles-want .8s ease-in-out infinite alternate}
.tiles-pad{display:grid;grid-template-columns:repeat(3,72px);grid-template-rows:repeat(2,72px);gap:8px}
.tiles-cap{display:grid;place-items:center;border:4px solid #cbd5e1;border-bottom-width:10px;border-radius:14px;background:#fff}
.tiles-cap.up{grid-column:2;grid-row:1;animation:tiles-tap 2.4s infinite}.tiles-cap.left{grid-column:1;grid-row:2;animation:tiles-tap 2.4s .6s infinite}.tiles-cap.down{grid-column:2;grid-row:2;animation:tiles-tap 2.4s 1.2s infinite}.tiles-cap.right{grid-column:3;grid-row:2;animation:tiles-tap 2.4s 1.8s infinite}
.tiles-cap .tiles-arrow{position:static;width:44px;height:44px}.tiles-cap .tiles-arrow svg{width:100%;height:100%;fill:#1f2a44}
@keyframes tiles-tap{0%,20%,100%{translate:0 0;border-bottom-width:10px;background:#fff}10%{translate:0 6px;border-bottom-width:4px;background:#fde047}}
