:root{font-family:"Trebuchet MS","Segoe UI",sans-serif;color:var(--navy);background:#f4f7fc;font-synthesis:none;--red:#e43433;--navy:#00245f;--blue:#3f7bbb;--yellow:#f7b935;--muted:#496084}*{box-sizing:border-box}body{margin:0}button,select{font:inherit}button{cursor:pointer;border:0;font-weight:800;transition:transform .15s,background .15s;touch-action:manipulation}button:hover:not(:disabled){transform:translateY(-2px);filter:brightness(.97)}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,a:focus-visible,select:focus-visible{outline:4px solid var(--red);outline-offset:4px}button:disabled{opacity:.45;cursor:default}button[aria-pressed="true"]{outline:3px solid var(--navy);outline-offset:2px}[hidden]{display:none!important}.app{max-width:1440px;margin:auto;padding:0 46px}header{min-height:110px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #d9e3f1;gap:20px}.brand{display:flex;align-items:center;gap:10px;color:var(--navy);text-decoration:none;font-size:32px;letter-spacing:-1.5px;font-weight:900}.brand img{width:58px;height:58px}.brand-accent{color:var(--blue)}.brand small{display:block;font-size:10px;letter-spacing:1.5px;margin-top:4px;color:var(--muted)}.utilities{display:flex;gap:10px}.utility{background:transparent;color:#334e76;font-size:14px;padding:12px 10px;border-radius:12px}.mission-bar{display:flex;align-items:center;justify-content:space-between;margin:24px 0 20px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;color:#496084}h1{font-size:28px;margin:5px 0 0;letter-spacing:-.6px}h1 span{font-weight:500}nav{display:flex;align-items:center;gap:10px}nav>span{font-size:12px;letter-spacing:1.5px;font-weight:800;margin-right:8px}nav button{width:46px;height:46px;border-radius:15px;background:#e8eef8;color:var(--navy);font-size:22px}nav button[aria-current="true"]{background:var(--navy);color:white;box-shadow:0 4px 0 #001738}.workspace{display:grid;grid-template-columns:1.08fr 1fr;gap:36px;align-items:stretch}.play-area{padding:18px 22px 12px;background:#e7effa;border:1px solid #cbdcf0;border-radius:25px;display:flex;flex-direction:column;align-items:center;justify-content:center}.board-wrap{position:relative;width:min(100%,420px);aspect-ratio:1}.board{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;width:100%;height:100%;padding:6px;border-radius:17px;background:var(--blue);box-shadow:0 6px 0 #295d98}.cell{min-width:0;position:relative;border-radius:10px;background:#ffffff;display:grid;place-items:center;aspect-ratio:1;color:var(--navy);opacity:1!important}.cell:nth-child(even){background:#edf3fc}.cell .star{font-size:clamp(30px,4vw,55px);color:var(--yellow);filter:drop-shadow(0 3px 0 #9b6709);line-height:1}.cell .rock{width:60%;height:56%;background:#8294ae;clip-path:polygon(23% 12%,66% 0,100% 49%,87% 91%,29% 100%,0 64%,7% 37%);box-shadow:inset -12px -12px #5b6f8e;transform:rotate(-8deg)}.cell .start-marker{height:16px;width:16px;border:3px dashed #7398c5;border-radius:50%}.editing .cell{cursor:crosshair}.editing .cell:hover{outline:3px solid var(--navy);outline-offset:-3px}.robot{position:absolute;left:0;top:0;width:20%;height:20%;display:grid;place-items:center;pointer-events:none;transition:transform .48s ease;z-index:2}.robot-turn{width:85%;height:85%;position:relative;transition:transform .4s ease;display:grid;place-items:center}.robot img{width:100%;height:100%;filter:drop-shadow(0 3px 1px #00245f33)}.direction-arrow{position:absolute;top:-11%;left:40%;font-size:19px;color:var(--navy)}.robot.celebrate img{animation:bounce .5s ease 4}.board-caption{display:flex;justify-content:space-between;width:100%;font-size:14px;margin-top:18px;color:#405e84;gap:10px}.board-caption>span:first-child{color:var(--navy)}.board-caption strong{font-size:16px}.program-panel{padding:26px;background:#fff;border:1px solid #d9e3f1;border-radius:25px;display:flex;flex-direction:column;min-width:0;box-shadow:0 5px 0 #e0e8f5}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}h2{margin:0;font-size:26px;letter-spacing:-.5px}.panel-heading>span{border-radius:20px;background:#edf2fa;padding:7px 12px;color:#405e84;font-size:14px;font-weight:800}.hint{color:var(--muted);font-size:15px;margin:10px 0 20px}.sequence{padding:0;margin:0;list-style:none;display:grid;grid-template-columns:repeat(6,1fr);gap:9px}.sequence li{height:66px;border:2px dashed #d2ddef;border-radius:13px;background:#f7f9fd;position:relative;display:grid;place-items:center;font-size:34px;font-weight:bold;color:var(--navy)}.sequence li.filled{border:2px solid var(--blue);background:#e8f1fc;box-shadow:0 3px 0 #c5d8f1}.sequence li.left{background:#fff3d7;border-color:var(--yellow);color:var(--navy);box-shadow:0 3px 0 #eed8a4}.sequence li.right{background:#feeeee;border-color:var(--red);color:var(--navy);box-shadow:0 3px 0 #f4c6c6}.sequence li.active{outline:4px solid var(--navy);outline-offset:1px;transform:translateY(-4px)}.sequence .number{position:absolute;top:3px;left:6px;font-size:10px;color:#496084}.status{background:#edf2fa;border-radius:13px;padding:15px;text-align:center;font-size:17px;font-weight:700;min-height:68px;display:grid;place-items:center;margin:22px 0 18px;flex:1}.status.success{background:#fff3d7;color:var(--navy);border:2px solid var(--yellow)}.status.warning{background:#feeeee;color:#9b2424;border:2px solid var(--red)}.program-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:12px}.primary,.secondary{min-height:53px;border-radius:13px;padding:12px 16px;font-size:20px}.primary{background:var(--navy);color:white;box-shadow:0 4px 0 #001738}.secondary{background:#e8eef8;color:#334e76}.reset{background:transparent;color:#496084;font-size:15px;padding:14px 0 0;align-self:center}.commands{display:flex;align-items:center;gap:15px;margin-top:25px}.command-label{font-size:11px;line-height:1.6;letter-spacing:1.2px;color:#405e84;min-width:115px}.commands button{flex:1;border-radius:16px;min-height:72px;font-size:23px;display:flex;align-items:center;justify-content:center;gap:18px;border:1px solid #295d98;box-shadow:0 4px 0 #295d98;color:#ffffff;background:var(--blue)}.commands button span{font-size:40px;line-height:1}.commands .left{background:var(--yellow);border-color:#daa022;box-shadow:0 4px 0 #cf951c;color:var(--navy)}.commands .right{background:var(--red);border-color:#c72c2b;box-shadow:0 4px 0 #b92a29;color:#ffffff}footer{display:flex;justify-content:space-between;align-items:center;color:#496084;font-size:12px;padding:24px 0 18px}.footer-star{color:var(--yellow);font-size:20px;margin-left:8px}.editor-tools{display:grid;grid-template-columns:1fr 1fr;gap:12px}.editor-tools button{background:#e8eef8;color:var(--navy);min-height:46px;border-radius:11px;font-size:17px}.orientation{display:flex;align-items:center;justify-content:space-between;font-size:16px;gap:12px;margin:22px 0}.orientation select{padding:10px;border:1px solid #b8cbe5;border-radius:8px;background:white;color:var(--navy)}.editor-status{font-size:15px;color:#405e84;min-height:36px}.editing .board-caption{visibility:hidden}#confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:10}.confetti-piece{position:absolute;top:-25px;width:12px;height:19px;animation:fall 2.5s ease-in forwards}@keyframes fall{to{transform:translateY(110vh) rotate(680deg)}}@keyframes bounce{50%{transform:translateY(-12px)}}
@media(min-width:1100px) and (max-height:800px){header{height:82px}.mission-bar{margin:15px 0}.board-wrap{width:350px}.play-area{padding:15px 20px 10px}.program-panel{padding:21px}.sequence li{height:57px}.status{margin:16px 0 13px;min-height:60px}.commands{margin-top:20px}.commands button{min-height:64px}footer{padding:18px 0 10px}}
@media(min-width:1600px) and (min-height:900px){.app{max-width:1580px}header{height:115px}.board-wrap{width:510px}.program-panel{padding:34px}.sequence li{height:86px;font-size:44px}.hint{font-size:19px}.status{font-size:23px}.commands button{min-height:85px;font-size:27px}.primary,.secondary{font-size:24px;min-height:66px}.board-caption{font-size:18px}.board-caption strong{font-size:20px}}
@media(max-width:1050px){.app{padding:0 22px}.utilities{gap:0}.utility{font-size:13px}.brand small{display:none}.workspace{gap:20px}.play-area{padding:14px}.program-panel{padding:20px}.sequence{gap:6px}.sequence li{height:55px}.command-label{display:none}.commands button{font-size:20px;gap:10px}.board-caption{font-size:12px}.board-caption strong{font-size:14px}h1{font-size:23px}}
@media(max-width:740px){header{height:auto;min-height:88px;flex-wrap:wrap;padding:14px 0;gap:8px}.brand{font-size:27px}.brand img{width:43px;height:43px}.utilities{width:100%;justify-content:space-between}.utility{padding:8px 4px;font-size:12px}.mission-bar{gap:14px;flex-wrap:wrap;margin:20px 0}.eyebrow{font-size:10px}h1{font-size:22px}nav button{width:40px;height:40px}.workspace{grid-template-columns:1fr}.board-wrap{max-width:390px}.commands{flex-wrap:wrap;gap:10px}.commands button{font-size:17px;min-height:60px;gap:7px}.commands button span{font-size:28px}.sequence li{height:60px}footer{font-size:10px;gap:10px}.orientation{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* El logotipo original tiene letras blancas; el fondo azul permite leerlas. */
.brand-group{display:flex;align-items:center;gap:22px;min-width:0}
.school-logo{display:block;flex-shrink:0;width:180px;height:auto;padding:8px;background:var(--blue);border-radius:12px}
@media(max-width:1050px){.brand-group{gap:12px}.school-logo{width:145px}.brand{font-size:27px}}
@media(max-width:740px){.brand-group{width:100%;justify-content:space-between;gap:8px}.school-logo{width:124px;padding:6px}.brand{font-size:24px;gap:6px}}
@media(max-width:360px){.school-logo{width:106px}.app{padding:0 14px}}

/* Diez misiones, también en pantallas pequeñas. */
.mission-bar{gap:16px;flex-wrap:wrap}nav{flex-wrap:wrap;max-width:100%}
