.challenge-overlay{position:fixed;inset:0;z-index:30;background:#061521b5;display:grid;place-items:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));backdrop-filter:blur(5px);touch-action:none}
.challenge-panel{box-sizing:border-box;width:min(720px,100%);max-height:100%;overflow:auto;border:1px solid #72b9cf66;border-radius:22px;background:#163043;color:#e3f0f5;padding:22px;box-shadow:0 24px 90px #0007}
.repair-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.repair-heading .eyebrow{margin:0 0 8px}.repair-heading h2{font-size:clamp(17px,3.5vw,26px);margin:0;font-weight:650;letter-spacing:-.02em}.repair-heading button{flex:none;min-width:48px;min-height:48px;font-size:25px;background:#254a60;color:#d2edf4;border:1px solid #6b9bb0;border-radius:10px}
#repair-instruction{font-size:17px;margin:12px 0;color:#a9e8ef}#repair-canvas{display:block;width:100%;height:auto;max-height:55dvh;aspect-ratio:720/440;border-radius:14px;touch-action:none;cursor:grab;object-fit:fill;outline-offset:3px}#repair-canvas:active{cursor:grabbing}
.repair-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:52px;margin-top:10px;font-size:14px}.repair-bottom button{min-height:48px;padding:10px 17px;background:#b4eadb;color:#143747;border:0}
#repair-nearby{position:fixed;z-index:5;bottom:180px;left:50%;transform:translateX(-50%);padding:14px 23px;min-height:52px;background:#d4eff1;color:#102b3c;border:1px solid #fff9;border-radius:16px;box-shadow:0 8px 35px #0006;white-space:nowrap}#repair-route{position:fixed;top:110px;left:32px;color:#b7dfe8;max-width:230px;font-size:12px;line-height:1.65;pointer-events:none}body:not([data-phase="playing"]) #repair-nearby,body:not([data-phase="playing"]) #repair-route{display:none}body[data-mouse="locked"] #repair-nearby{pointer-events:none}
#reset-playthrough{margin-top:15px;min-height:48px;background:transparent;color:#b7cdd7;border:1px solid #7391a566;padding:10px 18px}#reset-confirm{font-size:14px;color:#dae8ee}#reset-confirm button{min-height:48px;margin:5px;padding:9px 14px}#reset-yes{background:#e8bd91;color:#302b28}#reset-no{background:#315064;color:white}
.challenge-review-tools{position:fixed;z-index:8;top:85px;right:12px;display:flex;gap:5px;flex-wrap:wrap;max-width:280px}.challenge-review-tools button{padding:8px;background:#184154;color:white;border:1px solid #5795aa;font-size:11px;min-height:34px}.challenge-review-tools output{font-size:11px;color:#b3f6da;background:#12313e;padding:5px;width:100%}
@media(max-width:700px){.challenge-panel{padding:14px;border-radius:16px}.repair-bottom{font-size:12px}.repair-heading .eyebrow{font-size:10px}#repair-route{top:85px;left:16px;max-width:170px;font-size:10px}#repair-nearby{bottom:calc(175px + env(safe-area-inset-bottom));font-size:13px;padding:12px 17px}.repair-bottom button{font-size:12px}}
@media(max-height:500px){.challenge-panel{padding:10px 16px;width:min(670px,100%)}.repair-heading .eyebrow{margin-bottom:2px}.repair-heading h2{font-size:17px}.repair-heading button{min-height:40px;min-width:44px}#repair-instruction{margin:3px 0 7px;font-size:14px}#repair-canvas{height:calc(100dvh - 165px);max-height:none;aspect-ratio:auto}.repair-bottom{min-height:42px;margin-top:5px}.repair-bottom button{min-height:40px;padding:7px 15px}#repair-route{top:70px;left:16px;font-size:10px}#repair-nearby{bottom:85px;font-size:12px;padding:10px}}
/* Put the short repair directions below the existing objective card. */
#repair-route{top:330px;left:35px;margin:10px 0;max-width:225px;font-size:11px}
body[data-touch=true] #repair-route{top:calc(244px + var(--safe-top));left:calc(18px + var(--safe-left));max-width:160px;font-size:10px}
@media(max-height:580px) and (min-width:701px){#repair-route{top:278px;font-size:10px}}
@media(max-height:550px){body[data-touch=true] #repair-route{top:calc(144px + var(--safe-top));max-width:180px;font-size:9px}}
body[data-phase="challenge"] *{cursor:auto!important}body[data-phase="challenge"] #repair-canvas{cursor:grab!important}
@media(min-width:701px){#pause-panel{max-height:calc(100dvh - 32px);overflow:auto}}
