:root{color-scheme:dark;--mint:#8cf0ad;--ink:#173b35;--gold:#ffdb76}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#101d2b;color:#fff;font-family:'Trebuchet MS','Segoe UI',sans-serif}body{height:100dvh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;border:0}button:disabled{cursor:default;opacity:.65}button:focus-visible,a:focus-visible{outline:3px solid #fff;outline-offset:4px}button:active{transform:translateY(2px)}img{display:block;max-width:100%;pointer-events:none;user-select:none}.pantalla{display:none;position:absolute;inset:0;overflow-y:auto}.pantalla.activa{display:flex;flex-direction:column;align-items:center;animation:entra .25s ease}#app{position:relative;max-width:640px;height:100dvh;margin:auto;overflow:hidden;background:#173b35;box-shadow:0 0 100px #0008}.audio-tools{position:absolute;right:12px;bottom:12px;display:flex;gap:6px;z-index:20}.audio-tools button{width:36px;height:36px;border-radius:50%;border:1px solid #ffffff65;background:#102c31ed;font-size:24px;box-shadow:0 3px 10px #0005}.audio-tools [aria-pressed=true]{opacity:.6;text-decoration:line-through}.btn{padding:14px 26px;border-radius:30px;background:linear-gradient(#8cefad,#2cba6e);color:#113e2d;border:2px solid #eaffd8;box-shadow:0 5px 0 #166443,0 9px 18px #0004;font-weight:900;letter-spacing:.6px;font-size:19px}.btn.small{font-size:16px;padding:10px 20px}.eyebrow{font-size:10px;font-weight:bold;letter-spacing:2px;color:var(--gold);margin:0 0 12px}.barra{height:12px;border-radius:20px;background:#0005;overflow:hidden;border:1px solid #ffffff45}.barra i{display:block;height:100%;background:linear-gradient(90deg,#ffc56d,#83e79d);transition:width .15s linear}.top{width:100%;min-height:64px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px;z-index:4;background:linear-gradient(#102f38d9,#102f3800)}.volver{width:38px;height:38px;border-radius:50%;color:#174c3d;background:#fffbe8;font-size:33px;line-height:32px}.chip{border:1px solid #ffffff65;background:#143c39dd;border-radius:22px;padding:8px 13px;font-size:15px;font-weight:bold}h2{font-size:28px;margin:0}p{line-height:1.45}
#inicio{background:linear-gradient(#14295144,#14295111 50%,#102943ee),url(img/fondo-inicio.jpg) center/cover;text-align:center;justify-content:space-between;padding:36px 24px 60px}.intro-copy h1{font-size:clamp(38px,9vw,57px);line-height:1.02;margin:0;text-shadow:0 4px #29215e,0 0 25px #29215e}.intro-copy h1 span{color:#adffba}.intro-copy>p:last-child{font-weight:bold;font-size:15px}.planeta-hero{width:min(58%,265px);filter:drop-shadow(0 10px 12px #0004);animation:flota 4s ease-in-out infinite}.inicio-bottom{width:100%;display:flex;flex-direction:column;align-items:center;gap:18px}.health{width:260px;padding:10px 16px;border-radius:14px;background:#122f4ec9;font-size:12px}.health span{display:flex;justify-content:space-between;margin-bottom:8px}.inicio-bottom a{color:#f7efca;font-size:12px}.inicio-bottom small{font-size:10px;color:#e0ecdc99}
#mapa{background:#509590}.map-scroll{overflow:auto;width:100%;flex:1;scroll-behavior:smooth}.map-scroll::-webkit-scrollbar{width:4px}.map-scroll::-webkit-scrollbar-thumb{background:#fff5}#mapa>.top{position:absolute;top:0;background:#194745e8}#camino{width:100%;position:relative;aspect-ratio:944/1800;min-height:1000px;background:linear-gradient(#12433c66,transparent 35%),url(img/fondo-mapa.jpg) center/100% 100%}.map-heading{position:absolute;top:80px;left:20px;text-shadow:0 2px 5px #13342f}.map-heading small{font-size:10px;letter-spacing:2px;color:#fff3c6}.map-heading h2{font-size:30px;margin-top:5px}.map-heading p{font-size:12px}.node{position:absolute;transform:translate(-50%,-50%);width:104px;display:flex;flex-direction:column;align-items:center;background:transparent;padding:0;z-index:2}.node:active{transform:translate(-50%,-48%)}.node>img{width:76px;filter:drop-shadow(0 5px 4px #0006)}.node strong{position:absolute;top:24px;font-size:22px;text-shadow:0 2px 2px #22382c}.node .node-label{display:block;white-space:nowrap;margin-top:4px;background:#153e34ec;border:1px solid #ffffffa0;padding:4px 8px;border-radius:12px;font-size:11px}.node small{font-size:10px;border-radius:8px;background:#213f34;padding:3px 7px;color:#ffe6a0;margin-top:4px}.node .stars{position:absolute;top:58px;color:#ffdb66;text-shadow:0 2px #60451c}.node.playable>img{animation:pulso 3s ease-in-out infinite}.node.boss>strong{font-size:18px;top:3px;letter-spacing:1px;color:#f3db9d}.node.boss{width:150px}.boss-icon{display:grid;place-items:center;background:#283440;border:3px solid #eca860;border-radius:40% 40% 20% 20%;height:94px;width:94px;font-size:48px;box-shadow:0 6px 0 #142331,0 0 35px #f8904955}.map-note{width:100%;padding:12px 85px 12px 12px;background:#153c38;font-size:11px;min-height:60px;color:#f2efcf}
#juego{background:linear-gradient(#153b3e,#337952);padding-bottom:65px}.mission-head{text-align:center;padding:6px 20px 8px;width:100%;max-width:520px}.mission-head h2{font-size:26px}.mission-head>p:last-child{font-size:13px;color:#e0f0dd;min-height:36px;margin:8px 0}.mission-head .eyebrow{margin:0 0 7px}#escenario{width:100%;padding:0 18px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:0}#feedback{min-height:43px;text-align:center;font-weight:bold;font-size:15px;padding:8px 14px;color:#ffe8b1;max-width:100%}#feedback.success{color:#b6ffd0}#reloj{width:85%;margin:2px auto 12px}#reloj[hidden]{display:none}#reloj>div:first-child{display:flex;justify-content:space-between;font-size:10px;margin-bottom:5px;color:#e7f0e3}#reloj.urgente .barra i{background:#ffae78}#reloj.urgente #tiempoTexto{color:#ffcf8d;font-weight:bold}.objective{width:100%;background:#fffae5;color:#314c39;padding:12px 16px;border-radius:15px;border:2px solid #e4db9e;text-align:center;font-size:15px;box-shadow:0 4px #173b3544}.objective b{font-size:22px}.subtle{font-size:11px;color:#e0eed5;text-align:center;margin:0}.action-row{display:flex;align-items:center;gap:12px;justify-content:center;width:100%}.secondary{padding:10px 14px;background:#ffffff15;border:1px solid #ffffff65;border-radius:18px;font-size:13px}
#juego.bosque{background:radial-gradient(at 60% 10%,#70a864,#244d3d 80%)}.garden-wrap{width:100%;max-width:390px;padding:18px 12px 12px;background:#79543a;border:5px solid #bc9762;border-radius:22px;box-shadow:0 10px #173e2e66;transform:perspective(800px) rotateX(8deg)}.garden{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;touch-action:none;user-select:none}.plot{height:57px;border:1px dashed #dcb68d77;background:#583d2a;border-radius:9px;font-size:30px;position:relative;color:#d2b68c}.plot::after{content:'';width:18px;height:3px;background:#3e2a20;position:absolute;bottom:8px;left:calc(50% - 9px);border-radius:50%}.plot.planted{background:#526338;border:1px solid #9cc773}.plot.planted::after{display:none}.garden-info{display:flex;justify-content:space-between;font-size:12px;margin-top:12px;color:#fff0cf}.garden-tools{display:flex;gap:8px}.garden-tools button[aria-pressed=true]{background:#f5d180;color:#384a2c}.garden-note{font-size:12px;text-align:center;color:#f2e7c6}
#juego.residuos{background:linear-gradient(#153654dd,#143f3455),url(img/fondo-inicio.jpg) center bottom/cover}.waste-stage{flex:1;min-height:155px;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;position:relative}.waste-object{font-size:76px;width:135px;height:135px;background:radial-gradient(#fffffff0,#ffffff80 55%,#fff0 70%);display:grid;place-items:center;transition:transform .4s,opacity .4s}.waste-object.sorted{transform:translateY(90px) scale(.2);opacity:0}.waste-name{padding:6px 14px;background:#123e3ce6;border-radius:16px;font-weight:bold;font-size:15px}.bins{display:flex;width:100%;gap:6px;align-items:flex-end}.bin{background:transparent;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;padding:0}.bin img{width:100%;max-width:150px}.bin span{background:#132f34dc;border-radius:10px;padding:5px 6px;font-size:11px;white-space:nowrap}.dots{display:flex;gap:8px}.dots span{width:10px;height:10px;border-radius:50%;background:#ffffff50}.dots .done{background:#a3f2b3}.dots .miss{background:#efaa92}
#juego.luces{background:radial-gradient(at 70% 20%,#30497c,#111b31 75%)}.energy-hud{display:flex;width:100%;gap:8px}.energy-hud>div{flex:1;background:#172a48;border:1px solid #607391;border-radius:12px;padding:8px;text-align:center;font-size:10px;color:#ccdbed}.energy-hud strong{display:block;font-size:24px;color:#ffd989;margin-top:3px}.building{width:100%;max-width:400px;padding:18px 14px 12px;border-radius:25px 25px 6px 6px;border:4px solid #677a8f;background:#35455b;box-shadow:0 8px #0b1729;position:relative}.building::before{content:'EDIFICIO DEL BARRIO';display:block;text-align:center;font-size:10px;letter-spacing:2px;color:#dbe7ef;margin-bottom:14px}.rooms{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.room{background:#ffe1a0;border:4px solid #1e3048;box-shadow:0 0 14px #ffd27b22;border-radius:7px;min-height:103px;display:flex;align-items:center;flex-direction:column;justify-content:space-between;padding:6px 3px;color:#433b3a;transition:background .3s}.room.off{background:#142139;color:#a2b3c7;box-shadow:none}.room .occupant{font-size:25px;height:32px}.room .room-name{font-size:10px}.room .watts{font-size:12px;font-weight:bold}.room .switch{font-size:9px;border-radius:8px;background:#42382422;padding:3px 6px}.room.off .switch{background:#c5d5ef22}.room.required{border-color:#91b2bb}.city-note{width:100%;background:#172b44;border-left:3px solid #e9cd87;padding:8px 12px;font-size:11px;line-height:1.5;border-radius:4px}.shake{animation:sacude .25s}
#resultado{background:linear-gradient(#153652bb,#15365244),url(img/fondo-inicio.jpg) center/cover;text-align:center;justify-content:center;gap:16px;padding:28px 24px 70px}#resultado h2{font-size:32px}#resultado .eyebrow{margin:0}#estrellas{font-size:46px;letter-spacing:8px;color:#ffd265;text-shadow:0 3px #a36728}.premio{position:relative;width:230px;height:160px}.premio>img:first-child{width:165px;position:absolute;bottom:0;left:0;animation:flota 4s ease-in-out infinite}.premio>img:last-child{width:105px;position:absolute;right:0;top:0}.tarjeta{background:#fffbed;color:#24483e;border-radius:20px;padding:18px;width:100%;max-width:370px;box-shadow:0 6px #133e3888}.tarjeta h3{margin:0 0 6px;font-size:18px}.tarjeta p{font-size:12px;margin:0 0 14px}.tarjeta>div{display:flex;justify-content:space-between;margin-top:7px;font-size:14px}.dato{font-size:12px;max-width:340px;color:#fff3d2;margin:0}dialog{background:#173f3c;color:#fff;border:2px solid #d9e8c7;border-radius:24px;padding:30px 24px;width:calc(100% - 32px);max-width:410px;text-align:center;box-shadow:0 20px 80px #000a;max-height:90dvh}dialog::backdrop{background:#071d25b8;backdrop-filter:blur(5px)}dialog h2{font-size:27px}.cerrar{position:absolute;right:8px;top:8px;background:#ffffff22;border-radius:50%;width:30px;height:30px;font-size:23px}#briefTexto{font-size:14px;color:#edf3d4}.brief-mecanica{font-size:12px;color:#c4e4d7;border-top:1px solid #ffffff33;padding-top:15px;margin-bottom:24px}#briefArte{font-size:54px;margin:20px 0 10px}#briefArte .boss-icon{margin:auto}
@keyframes flota{50%{transform:translateY(-9px) rotate(-2deg)}}@keyframes entra{from{opacity:0}to{opacity:1}}@keyframes pulso{50%{filter:drop-shadow(0 2px 10px #ffffac)}}@keyframes sacude{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@media(min-width:800px){body{padding:14px}#app{height:calc(100dvh - 28px);border-radius:25px;border:1px solid #ffffff24}.plot{height:64px}}
@media(max-height:740px){#inicio{padding-top:23px}.intro-copy h1{font-size:37px}.planeta-hero{width:170px}.inicio-bottom{gap:12px}.mission-head h2{font-size:23px}.mission-head>p:last-child{font-size:12px;min-height:0}.top{min-height:55px;padding:8px 14px}.plot{height:43px}.garden-wrap{padding:10px}.room{min-height:82px}.room .occupant{font-size:20px;height:24px}.building{padding:10px}.building::before{margin-bottom:8px}#escenario{gap:9px}.waste-object{font-size:64px;width:105px;height:105px}.waste-stage{min-height:125px}#resultado{gap:10px}#resultado .premio{height:125px;width:190px}.premio>img:first-child{width:135px}.premio>img:last-child{width:85px}}
/* En alturas chicas, la misión completa se desplaza. El escenario no se comprime
   por debajo de sus controles, evitando que el mensaje cubra el botón final. */
#juego>*{flex-shrink:0}#escenario{flex:1 0 auto;min-height:auto;padding-top:8px;padding-bottom:12px}#feedback{flex-shrink:0}#escenario>*{flex-shrink:0}
/* Franja de sonido propia: nunca queda encima de los controles del juego. */
.pantalla{bottom:48px}.audio-tools{left:0;right:0;bottom:0;height:48px;padding:6px 12px;justify-content:flex-end;background:#102c31;border-top:1px solid #ffffff22}.audio-tools::before{content:'Música / efectos';font-size:10px;color:#d3e5d4;align-self:center;margin-right:auto}#juego{padding-bottom:8px}#inicio{padding-bottom:24px}#resultado{padding-bottom:28px}.map-note{padding:12px;min-height:42px}.map-heading p{display:none}.map-heading h2{font-size:27px}.map-heading{top:78px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.audio-tools::before{display:none}.audio-tools>a{color:#e4f7dc;font-size:12px;margin-right:auto;padding:7px 4px}.volumen-label{display:flex;align-items:center;gap:5px;color:#d3e5d4;font-size:10px;margin-right:7px}.volumen-label input{width:72px;accent-color:#90deaa}

.credito-rt{display:flex;align-items:center;gap:8px;font-size:12px;color:#f7efca}.credito-rt a{display:inline-flex;background:#fff;border-radius:8px;padding:3px 6px}.credito-rt img{display:block;height:28px;width:auto}
