*{box-sizing:border-box} :root{--blue:#4D55F7;--lime:#B4FF42;--ink:#22212d;--lav:#efedff} [hidden]{display:none!important} body{margin:0;background:#f6f5fb;color:var(--ink);font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid var(--blue);outline-offset:4px}main{width:min(1040px,calc(100% - 40px));margin:0 auto;padding:28px 0 30px}header{display:flex;justify-content:space-between;align-items:center;margin:0 2px 23px}.brand{text-decoration:none;color:var(--ink);font-size:27px;letter-spacing:-1.7px;font-weight:950}.brand span{color:var(--blue)}.tag{font-size:10px;font-weight:800;letter-spacing:1.8px;color:#817c9a}.game{position:relative;width:100%;aspect-ratio:1.8;border-radius:28px;overflow:hidden;background:var(--lav);border:1px solid #dedaf5;isolation:isolate}.cover{position:absolute;inset:0}.cover>img{width:100%;height:100%;object-fit:fill;display:block}.levels{position:absolute;left:4.2%;top:56.4%;width:39.7%;height:10.8%;display:flex;gap:5%}.levels button{border:1px solid #fff;background:linear-gradient(#fff,#f9f8ff);border-radius:21%;color:#252330;font-weight:850;font-size:clamp(12px,2.25vw,26px);flex:1;min-width:0;box-shadow:0 5px 8px #c9c2eb66;padding:0}.levels button.active{background:linear-gradient(#e4e2ff,#d7d6ff);border:3px solid var(--blue);box-shadow:0 4px 0 #c6c2ef}.start{position:absolute;left:4.2%;top:73.4%;width:28.5%;height:14.3%;border:0;border-radius:20px;background:linear-gradient(#5860ff,#444bed);box-shadow:inset 0 1px 2px #ffffff66,0 5px 0 #393ed2;color:#fff;display:flex;align-items:center;justify-content:center;gap:5%;font-weight:850;font-size:clamp(20px,3.8vw,43px)}.start svg{width:18%;fill:currentColor}.start:hover{filter:brightness(1.06)}.board{position:absolute;inset:0;background:radial-gradient(ellipse at 40% 80%,#faf9ff90,transparent 70%),var(--lav);overflow:hidden}.progress{position:absolute;top:6.1%;left:3.2%;width:72%;height:6px;border-radius:10px;background:#d9d5fa}.progress i{display:block;width:0%;height:100%;border-radius:10px;background:var(--blue);transition:width .4s}.hud{position:absolute;top:3.1%;right:3%;display:flex;gap:8px;font-size:clamp(10px,1.65vw,17px);font-weight:850}.hud span{background:#ffffffde;border:1px solid #e7e3fb;border-radius:30px;min-width:68px;text-align:center;padding:8px 13px}.question{position:absolute;top:11.2%;left:6%;right:6%;text-align:center;z-index:3;pointer-events:none}.question h1{margin:0 auto;font-size:clamp(20px,3.2vw,33px);font-weight:900;letter-spacing:-.9px;line-height:1.3;max-width:920px;text-wrap:balance}.question p{margin:9px 0 0;color:#7c778f;font-size:clamp(11px,1.6vw,16px);line-height:1.35}.blank{display:inline-flex;align-items:flex-end;justify-content:center;min-width:55px;height:1em;margin:0 .1em;vertical-align:baseline;border-bottom:6px solid var(--blue);border-radius:3px;color:var(--blue);font-weight:900}.blank.filled{border:0;min-width:0}.world{position:absolute;inset:30% 0 0;overflow:hidden;touch-action:pan-y}.tiles{position:absolute;inset:0}.tile{position:absolute;top:0;left:0;min-width:83px;height:45px;padding:0 18px;display:flex;align-items:center;justify-content:center;background:linear-gradient(156deg,#fff 25%,#faf9ff 76%,#eeebfa);border:1px solid #ffffff;border-radius:14px;color:#262431;font-size:clamp(18px,2.65vw,27px);font-weight:900;letter-spacing:-.5px;box-shadow:inset 0 2px 3px #ffffff,0 5px 0 #d7d2eb,0 10px 12px #655a9b20;will-change:transform,left,top;z-index:2;user-select:none;touch-action:manipulation;transition:background .15s,border-color .15s,box-shadow .15s}.tile:hover,.tile.selected{background:linear-gradient(145deg,#f1f0ff,#dfddff);border:2px solid var(--blue);box-shadow:inset 0 1px 2px #fff,0 5px 0 #aaa4ec,0 10px 15px #6c61b32b;z-index:4}.tile.correct{background:#e8ffc6;border-color:#8dbb4a}.tile.wrong{background:#ffe8e4;border-color:#df8e85}.kmin{position:absolute;bottom:6%;left:50%;width:18%;max-width:180px;min-width:100px;aspect-ratio:1;transform:translateX(-50%);z-index:3;will-change:left}.body{position:absolute;inset:0;transform-origin:50% 90%;will-change:transform}.body>img{width:100%;height:100%;display:block;pointer-events:none;user-select:none}.eye-rig{position:absolute;left:34%;top:40%;width:40%;height:22%;will-change:transform}.eye{position:absolute;top:17%;width:22%;height:68%;background:linear-gradient(130deg,#fff,#f6f5ff);border-radius:24%;box-shadow:0 0 7px #dcd5ff30;transform-origin:center;will-change:transform}.left-eye{left:12%;transform:rotate(-4deg)}.right-eye{right:10%;transform:rotate(-4deg)}.brow{position:absolute;right:7%;top:0%;width:24%;height:8%;background:#fbfaff;border-radius:4px;transform:rotate(-12deg)}.eye-rig.blink .eye{transform:scaleY(.1) rotate(-4deg)}.eye-rig.happy .eye{transform:scaleY(.35) rotate(-8deg);border-radius:60% 60% 20% 20%}.eye-rig.sad .eye{transform:scaleY(.65) rotate(8deg)}.kmin-shadow{position:absolute;bottom:4.2%;left:50%;width:14%;height:4%;border-radius:50%;background:radial-gradient(ellipse,#45405c52,transparent 70%);transform:translateX(-50%);filter:blur(2px)}.pause{position:absolute;z-index:7;bottom:4%;right:3%;width:52px;height:52px;border:0;border-radius:15px;background:var(--blue);color:#fff;box-shadow:0 4px 0 #3b42d6;display:grid;place-items:center}.pause svg{width:26px;height:26px;fill:#fff}.pause:hover{background:#4149e5}.feedback{position:absolute;bottom:4%;left:50%;max-width:60%;transform:translateX(-50%);background:#ffffffec;border:1px solid #e0dcf4;padding:8px 13px;border-radius:20px;font-size:clamp(10px,1.3vw,13px);font-weight:750;color:#4f49a0;opacity:0;transition:opacity .2s;pointer-events:none;z-index:6}.feedback.visible{opacity:1}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:#e6e2ffad;backdrop-filter:blur(6px);z-index:8}.dialog{width:min(370px,85%);padding:30px 24px;text-align:center;border-radius:24px;background:#fff;border:1px solid #e3def8}.small-label{font-size:10px;letter-spacing:1.5px;font-weight:800;color:var(--blue)}.dialog h2{margin:12px 0 8px;font-size:27px;letter-spacing:-.8px}.dialog p{margin:0 0 22px;color:#817b94;font-size:14px;line-height:1.5}.primary{padding:12px 22px;background:var(--blue);color:#fff;border:0;border-radius:12px;font-weight:800}.text-button{display:block;margin:13px auto 0;border:0;background:transparent;color:#807b97;font-size:12px}.under{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:17px 5px 0;color:#78718e;font-size:12px}.under p{margin:0}.under>span{flex-shrink:0;font-size:10px;border:1px solid #ded9ef;border-radius:20px;padding:5px 10px;font-weight:750}.instruction{text-align:center;font-size:12px;line-height:1.65;margin:23px 0 0;color:#777087}.instruction span{font-size:11px;color:#9991aa}.game.hard .question h1{font-size:clamp(17px,2.8vw,28px)}.game.hard .world{top:34%}.game.hard .tile{min-width:68px;padding:0 13px;font-size:clamp(15px,2.2vw,23px)}
@media(max-width:600px){main{width:calc(100% - 20px);padding-top:17px}header{margin-bottom:16px}.brand{font-size:25px}.game{border-radius:19px}.game.playing{aspect-ratio:auto;height:400px}.start{border-radius:12px}.levels button.active{border-width:2px}.question{top:14%;left:5%;right:5%}.question h1{font-size:23px;line-height:1.3;letter-spacing:-.7px}.question p{font-size:11px}.world{top:35%}.tile{min-width:68px;height:37px;font-size:20px;padding:0 12px;border-radius:11px}.kmin{width:29%;min-width:105px;max-width:140px;bottom:9%}.kmin-shadow{bottom:7%;width:25%;height:5%}.pause{width:42px;height:42px;border-radius:12px;right:4%;bottom:4%}.pause svg{width:23px}.feedback{bottom:4%;max-width:72%;left:42%;padding:7px 9px}.hud{top:3.3%;right:4%;font-size:11px;gap:5px}.hud span{min-width:52px;padding:6px 8px}.progress{width:56%;top:6.2%;left:5%;height:5px}.under{align-items:flex-start;font-size:11px;gap:10px}.under p{max-width:70%;line-height:1.45}.under>span{font-size:9px;padding:5px 7px}.instruction{font-size:11px;margin-top:17px}.instruction span{font-size:10px}.game.hard .world{top:40%}.game.hard .question h1{font-size:19px}.game.hard .question p{font-size:10px}.game.hard .tile{min-width:56px;padding:0 9px;font-size:17px}}
@media(prefers-reduced-motion:reduce){.tile,.feedback{transition:none}.body{will-change:auto}}

/* Align live difficulty controls with the illustrated cover. */
.levels{left:4.05%;top:56.25%;width:39.95%;height:11.25%;display:block}
.levels button{position:absolute;top:0;height:100%;border-radius:clamp(12px,2.4vw,27px)}
.levels button:nth-child(1){left:0;width:32.65%}
.levels button:nth-child(2){left:36.15%;width:29.65%}
.levels button:nth-child(3){left:69.25%;width:30.75%}

/* Rain fades independently, leaving Kmin and point indicators fully visible. */
.tiles{-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 14%,#000 80%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 0%,#000 14%,#000 80%,transparent 100%)}
.tile{display:grid;place-items:center;border-width:2px;line-height:1;text-align:center;padding:0 18px}
.tile-label{display:block;line-height:1;text-align:center;margin:0;padding:0}
.pause{border-radius:0;box-shadow:none;color:#fff;transition:background-color .15s,color .15s}
.pause svg{fill:currentColor}
.pause:hover{background:var(--lime);color:var(--ink)}
.point-burst{position:absolute;z-index:6;pointer-events:none;font-size:14px;font-weight:950;line-height:1;color:var(--blue);transform:translateX(-50%);animation:point-burst .9s ease-out forwards}
@keyframes point-burst{0%{opacity:1;transform:translate(-50%,0) scale(.9)}20%{opacity:1;transform:translate(-50%,-5px) scale(1)}70%{opacity:1}100%{opacity:0;transform:translate(-50%,-28px) scale(1)}}
.eye-rig.error .eye{animation:error-eyes .78s ease-in-out both}
@keyframes error-eyes{0%{background:#fff;transform:rotate(-4deg) scale(1)}14%{background:#ff4759;transform:rotate(-4deg) scale(1.38)}30%{background:#ff4759;transform:rotate(-4deg) scale(1.3,.12)}47%{background:#ff4759;transform:rotate(-4deg) scale(1.38)}61%{background:#ff4759;transform:rotate(-4deg) scale(1.3,.12)}77%{background:#ff4759;transform:rotate(-4deg) scale(1.25)}100%{background:#fff;transform:rotate(-4deg) scale(1)}}
.game.paused .point-burst,.game.paused .eye-rig.error .eye{animation-play-state:paused}
@media(max-width:600px){.pause{border-radius:0}.tile{padding:0 12px}.point-burst{font-size:12px}}

.kmin,.kmin-shadow{pointer-events:none}

/* The entire right control column is excluded from the playfield. */
.board .world{right:calc(3% + 76px);touch-action:none}
.control-strip{position:absolute;right:0;bottom:0;top:30%;width:calc(3% + 76px);background:linear-gradient(to right,#ffffff08,#ffffff45);border-left:1px solid #e4e0f580;pointer-events:none}
.tiles{z-index:5}
.kmin{z-index:3}
.point-burst{z-index:6}
.pause{border-radius:12px}
.pause:hover{background:var(--lime);color:var(--ink)}
.waiting-bay{position:absolute;left:4px;bottom:0;width:calc(var(--waiting-width,180px) - 8px);height:30%;border:1px dashed #c9c5e5;border-radius:20px;background:#ffffff30;z-index:0;pointer-events:none}
.waiting-bay span{position:absolute;bottom:5px;left:5px;right:5px;color:#837ba4;text-align:center;font-size:10px;font-weight:750;line-height:1.2}
@media(max-width:600px){.board .world{right:calc(4% + 62px)}.control-strip{width:calc(4% + 62px)}.pause{border-radius:10px}.waiting-bay{border-radius:15px;height:38%}.waiting-bay span{font-size:8px;bottom:5px}}

/* Balanced shelter spacing and a compact mobile playfield. */
.waiting-bay{left:20px;bottom:20px;width:var(--waiting-width,180px);height:calc(var(--robot-size,150px) + 34px);border-radius:18px}
.waiting-bay.is-charging{background:#ffffff55;border-color:#b7b2e1}
.waiting-bay span{bottom:6px}
.kmin{bottom:44px}
.kmin-shadow{bottom:32px}
.eye-rig.charging:not(.error) .eye{background:#ffffff13;border:1.3px solid #fafaff;border-radius:3px;box-shadow:none;width:26%;height:80%;top:10%;transform:rotate(-4deg);overflow:visible}
.eye-rig.charging:not(.error) .eye::before{content:"";position:absolute;inset:2px;background:var(--lime);border-radius:1px;transform-origin:bottom;animation:battery-charge 1.8s steps(4,end) infinite}
.eye-rig.charging:not(.error) .eye::after{content:"";position:absolute;top:-4px;left:28%;width:44%;height:3px;background:#fafaff;border-radius:1px}
.eye-rig.charging:not(.error) .brow{opacity:0}
@keyframes battery-charge{0%,8%{transform:scaleY(.10);opacity:.8}80%,100%{transform:scaleY(1);opacity:1}}
.game.paused .eye-rig.charging .eye::before{animation-play-state:paused}
@media(max-width:600px){
 .game.playing{height:clamp(520px,calc(100svh - 180px),620px)}
 .board .world{left:0;right:0;bottom:0;top:210px}
 .control-strip{display:none}
 .board .pause{top:18px;right:20px;bottom:auto;width:40px;height:40px;border-radius:11px}
 .hud{top:21px;left:20px;right:80px;justify-content:flex-start;gap:7px}
 .hud span{padding:8px 10px;min-width:54px;font-size:11px}
 .progress{top:75px;left:20px;right:20px;width:auto;height:5px}
 .question{top:100px;left:20px;right:20px}
 .question h1{font-size:21px;line-height:1.3;letter-spacing:-.5px}
 .question p{font-size:11px;line-height:1.4;margin-top:9px}
 .game.hard .question h1{font-size:18px;line-height:1.35}
 .game.hard .question p{font-size:10px}
 .game .board .tile{min-width:48px;height:35px;font-size:17px;padding:0 9px;border-radius:10px;box-shadow:inset 0 1px 2px #fff,0 4px 0 #d7d2eb,0 7px 10px #655a9b20}
 .game.hard .board .tile{min-width:44px;font-size:16px;padding:0 8px}
 .game.playing .kmin{width:82px;min-width:82px;max-width:82px;bottom:44px}
 .kmin-shadow{width:72px;height:12px;bottom:33px}
 .waiting-bay{left:20px;bottom:20px;height:calc(var(--robot-size,82px) + 34px);border-radius:15px}
 .waiting-bay span{font-size:8px;bottom:6px}
 .feedback{bottom:7px;left:50%;max-width:88%;font-size:10px}
}
@media(max-width:360px){.game.playing .kmin{width:76px;min-width:76px;max-width:76px}.game.hard .question h1{font-size:17px}.game .board .tile{font-size:16px;min-width:44px;padding:0 8px}.game.hard .board .tile{font-size:15px;padding:0 7px}}

@media(max-width:360px){.game.hard .board .tile{font-size:14px;padding:0 6px;min-width:42px}}
