/* The game surface is the controller; the rest of the page still scrolls normally. */
.path-board,.puzzle-board,.pixel-grid,.music-pads,.flight-stage{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.path-board button,.puzzle-piece,.pixel-grid button,.music-pad{touch-action:none}
.path-board{grid-template-rows:repeat(var(--board-size),minmax(0,1fr))}
.puzzle-board{grid-template-rows:repeat(var(--puzzle-size),minmax(0,1fr))}
.path-board img,.music-pad img{pointer-events:none;-webkit-user-drag:none}
button.path-cell{padding:0;border:0;color:inherit;font:inherit;min-width:0;min-height:0;cursor:pointer}
.path-cell.reachable{box-shadow:inset 0 0 0 2px #a6d86f80;background:#3c5a38}
.path-cell.path.planned{background:#6a6730;box-shadow:inset 0 0 0 1px #dddf7760}
.path-cell.path.occupied{background:#738b3e}
.path-cell.route-end{box-shadow:inset 0 0 0 3px #e5f69a}
.path-cell .route-number{position:absolute;right:2px;bottom:2px;z-index:3;background:#e9ecac;color:#203322;font-size:11px;line-height:18px;min-width:18px;height:18px;border-radius:50%;font-weight:800;pointer-events:none}
.path-cell:disabled{opacity:1;cursor:default}
.code-layout{display:block;max-width:490px;margin:auto}
.code-layout .path-board{max-width:none}
.code-controls{margin-top:15px}
.route-summary{text-align:center;color:var(--green);font-weight:700;font-size:14px;margin:0 0 13px;min-height:22px}
.code-actions{justify-content:center}
.code-actions button{min-height:48px;min-width:88px}
.touch-caption{text-align:center;font-size:14px;color:#b4c8b8;margin:15px auto}
.puzzle-piece{cursor:grab;transition:box-shadow .12s,opacity .12s}
.puzzle-piece.touch-source{opacity:.35}
.puzzle-piece.touch-target{box-shadow:inset 0 0 0 5px #e9f599;filter:brightness(1.2)}
.touch-piece-ghost{position:fixed;z-index:1000;pointer-events:none;border:3px solid #e6f9a0;border-radius:10px;opacity:.9;box-shadow:0 12px 24px #0006;transform:scale(.95)}
.pixel-grid{cursor:crosshair}
.flight-stage{cursor:grab}
.flight-stage:active{cursor:grabbing}
@media(max-width:600px){
 .playing-game .explorer{padding-top:12px}
 .playing-game .section-header{display:none}
 .game-heading{margin-top:0}
 .dojo-game-meta{padding-top:9px;font-size:11px}
 .game-instruction{font-size:14px;line-height:1.5;margin:13px auto 16px}
 .path-board{gap:2px}
 .path-cell .route-number{font-size:10px;line-height:15px;min-width:15px;height:15px;bottom:1px;right:1px}
 .code-controls{margin-top:12px}
 .route-summary{font-size:13px}
 .touch-caption{font-size:12px}
 .flight-stage{height:clamp(300px,51svh,440px)}
 .flight-hud{margin-top:10px}
 .music-pads{margin-top:15px}
}
