#startScreen .mode-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
#startScreen #tutorialButton{color:white;background:linear-gradient(#05c8ff,#0872fa);align-items:center}
#startScreen #tutorialButton small{margin:0;color:#c5d4e9;text-align:center}
#startScreen .mode-actions button,#startScreen #startButton{font-size:clamp(11px,1.15vw,19px);min-width:0}
#tutorialPanel{position:fixed;right:24px;top:125px;width:min(340px,calc(100vw - 32px));padding:19px 21px;z-index:12;color:#eaf6ff;background:linear-gradient(145deg,#063250ed,#071c37f2);border:1px solid #77dcff70;border-radius:18px;box-shadow:0 12px 38px #00152c66;pointer-events:none}
#tutorialPanel[hidden],#tutorialMarker[hidden],#tutorialComplete[hidden]{display:none}
.tutorial-heading{display:flex;justify-content:space-between;gap:10px;color:#ffdc7e;font-size:10px;font-weight:800;letter-spacing:1px}
.tutorial-heading{align-items:center;position:sticky;top:0;z-index:1;background:#08324bef;border-radius:8px}
.tutorial-heading>span{flex:1}
#tutorialToggle{flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid #8bdbff88;border-radius:10px;background:#124968;color:#fff;font:700 24px system-ui;cursor:pointer;pointer-events:auto;touch-action:manipulation}
#tutorialToggle:hover{background:#236887}
body #tutorialPanel.tutorial-minimized{width:260px;max-height:none;padding:6px 10px;overflow:visible}
body #tutorialPanel.tutorial-minimized>:not(.tutorial-heading):not(#tutorialTitle){display:none}
body #tutorialPanel.tutorial-minimized #tutorialTitle{font-size:12px;line-height:1.4;margin:4px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tutorial-meter{height:4px;background:#ffffff20;margin:12px 0 17px;border-radius:4px;overflow:hidden}
.tutorial-meter i{display:block;height:100%;background:#ffcd53;transition:width .4s}
#tutorialPanel>small{font-size:10px;color:#84c8eb;letter-spacing:1.5px}
#tutorialPanel h2{font-size:22px;line-height:1.15;margin:7px 0 10px}
#tutorialCopy{font-size:13px;line-height:1.55;margin:0 0 13px}
#tutorialKeys{display:flex;gap:7px;flex-wrap:wrap}
#tutorialKeys kbd{padding:5px 9px;background:#e4f8ff;color:#073654;border-radius:6px;border-bottom:3px solid #67aecd;font:800 11px inherit}
#tutorialFeedback{min-height:20px;font-size:12px;line-height:1.4;color:#ffda80;margin:12px 0}
#tutorialPanel[data-feedback=error] #tutorialFeedback{color:#ffafba}
#tutorialPanel[data-feedback=success] #tutorialFeedback{color:#8bf0ba}
#tutorialProgress{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:12px 0 0;margin:0;border-top:1px solid #ffffff20;list-style:none;font-size:10px;color:#83a8bd}
#tutorialProgress .complete{color:#8bf0ba}#tutorialProgress .current{color:#ffdc7e;font-weight:800}
#tutorialPanel footer{font-size:10px;color:#a0c7dd;margin-top:14px}
#tutorialMarker{position:fixed;left:0;top:0;z-index:11;pointer-events:none;background:#062a46e8;color:#fff1bc;border:1px solid #ffdd72;border-radius:8px;padding:7px 10px;font-size:11px;font-weight:800;white-space:nowrap}
.tutorial-highlight{outline:3px solid #ffdc7e!important;outline-offset:4px;box-shadow:0 0 22px #ffd34377!important}
.tutorial-active .objective-panel,.tutorial-active .controls-panel{display:none!important}
.tutorial-active .quit-hint{font-size:0}.tutorial-active .quit-hint:after{content:'Retorna ao menu e restaura sua seleção anterior.';font-size:11px}
#tutorialComplete{max-width:640px;width:calc(100% - 32px);max-height:calc(100dvh - 32px);overflow:auto;background:linear-gradient(145deg,#074671,#061d3c);border:2px solid #84dcff;border-radius:24px;padding:32px;color:#ecf8ff;z-index:50}
#tutorialComplete h2{font-size:clamp(26px,4vw,44px);color:#ffdf69}
#tutorialComplete ul{padding-left:22px;line-height:1.9;font-size:14px}
#tutorialComplete button,#tutorialRestart{font:inherit;color:#fff;border:1px solid #7cdcff;border-radius:12px;background:linear-gradient(#05b6ec,#076bd8);padding:12px 15px;cursor:pointer}
.tutorial-enter{animation:tutorial-in .28s ease-out}
@keyframes tutorial-in{from{opacity:.3;translate:10px 0}to{opacity:1;translate:0 0}}
@media(max-width:760px){#startScreen .mode-actions small{font-size:8px}#startScreen .mode-actions{gap:6px}#startScreen .mode-actions button,#startScreen #startButton{font-size:11px}#tutorialPanel{right:12px;top:90px;padding:12px;width:260px}#tutorialPanel h2{font-size:18px}#tutorialCopy{font-size:11px}#tutorialProgress{font-size:9px;gap:4px}#tutorialPanel footer{font-size:9px}}
@media(max-height:650px){#tutorialPanel{top:70px;max-height:calc(100dvh - 190px);overflow:auto}#tutorialProgress{display:none}#tutorialPanel h2{font-size:18px}#tutorialCopy{font-size:12px}#tutorialFeedback{margin:7px 0;min-height:16px}}
@media(prefers-reduced-motion:reduce){.tutorial-enter{animation:none}.tutorial-meter i{transition:none}}

#tutorialComplete ul{text-align:left;max-width:470px;margin:24px auto}
#tutorialComplete .result-actions{display:grid;gap:12px}
/* Guide the next input without changing control size or hit areas. */
.tutorial-highlight{animation:tutorial-control-glow 1.3s ease-in-out infinite}
@keyframes tutorial-control-glow{
 0%,100%{filter:brightness(1);outline-color:#ffdc7e;box-shadow:0 0 10px #ffd34366}
 50%{filter:brightness(1.5);outline-color:#fff5bf;box-shadow:0 0 24px #ffe27bcc}
}
@media(prefers-reduced-motion:reduce){.tutorial-highlight{animation:none;filter:brightness(1.25)}}
#tutorialArrows{position:fixed;inset:0;z-index:30;pointer-events:none}
#tutorialArrows[hidden]{display:none}
.tutorial-control-arrow{position:absolute;width:36px;height:36px;pointer-events:none;filter:drop-shadow(0 2px 3px #001426);transform:rotate(var(--arrow-angle))}
.tutorial-control-arrow svg{display:block;width:100%;height:100%;overflow:visible;animation:tutorial-arrow-nudge .9s ease-in-out infinite}
.tutorial-control-arrow path{fill:#ffe34b;stroke:#fff7c6;stroke-width:2;stroke-linejoin:round}
@keyframes tutorial-arrow-nudge{0%,100%{transform:translateX(-3px)}50%{transform:translateX(2px)}}
@media(prefers-reduced-motion:reduce){.tutorial-control-arrow svg{animation:none}}
/* Keep the pointer in its own column, including wrapped key hints. */
body #tutorialKeys:has(.tutorial-highlight){position:relative;padding:8px 0 8px 50px;min-height:44px;box-sizing:border-box;align-items:center}
body #tutorialKeys:has(.tutorial-highlight)::before{content:'➜';position:absolute;left:4px;top:50%;transform:translateY(-50%);width:32px;color:#ffe34b;font:32px/1 system-ui;text-align:center;text-shadow:0 2px 3px #001426;pointer-events:none}

/* The gesture guide sits over the canvas but leaves every touch to the game. */
#tutorialTouchAim{position:fixed;left:50%;top:50%;transform:translate(-50%,-36px);z-index:31;pointer-events:none;text-align:center;width:min(280px,60vw);color:#fff3b4;filter:drop-shadow(0 2px 3px #001426);}
#tutorialTouchAim[hidden]{display:none}
#tutorialTouchAim *{pointer-events:none}
.touch-press-ring{position:relative;width:72px;height:72px;margin:0 auto 8px;border:3px solid #ffe34b;border-radius:50%;background:#07294366;box-sizing:border-box;}
.touch-press-ring::before{content:'';position:absolute;inset:-3px;border:3px solid #fff2a1;border-radius:50%;animation:tutorial-touch-pulse 1.25s ease-out infinite;}
.touch-press-ring svg{width:58px;height:58px;margin:5px;fill:#fff2be;stroke:#70481b;stroke-width:2;}
#tutorialTouchAim strong{display:block;padding:5px 8px;border-radius:7px;background:#062a46ed;font-size:12px;line-height:1.4;}
#tutorialTouchAim span{display:block;margin-top:3px;font-size:11px;line-height:1.4;color:white;text-shadow:0 1px 3px #000;}
@keyframes tutorial-touch-pulse{0%{transform:scale(1);opacity:1}100%{transform:scale(1.45);opacity:0}}
@media(prefers-reduced-motion:reduce){.touch-press-ring::before{animation:none}}
